summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-05-08 21:05:01 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-06-09 19:12:20 +1000
commit9591cc381a2d065781e6b45fb52ef2ee6aa29d20 (patch)
treeb54e09afc349a7b39673cdd25a940560379d8772 /test
parent901ab3ac1bc576bf9a334e32978e1b3ded5d8fc6 (diff)
support setting the author of a commit
update copy
Diffstat (limited to 'test')
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/COMMIT_EDITMSG1
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/FETCH_HEAD0
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/HEAD1
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/config10
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/description1
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/indexbin0 -> 281 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/info/exclude7
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/logs/HEAD4
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/logs/refs/heads/master4
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52bin0 -> 52 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827bin0 -> 21 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/20/75aeb39a2a66a9607860a65b2a71c5177602542
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bcebin0 -> 103 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/87/10ece70b7db9638b9645e93abdbcf210fa4595bin0 -> 149 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5bin0 -> 21 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416bin0 -> 77 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/ba/f3189129ba8878ba9b4107eaaaf3389287259bbin0 -> 157 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/d0/1c8bb001458d0a7c01193813685c658e0355acbin0 -> 150 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41bbin0 -> 21 bytes
-rw-r--r--test/integration/setAuthor/expected/repo/.git_keep/refs/heads/master1
-rw-r--r--test/integration/setAuthor/expected/repo/myfile11
-rw-r--r--test/integration/setAuthor/expected/repo/myfile21
-rw-r--r--test/integration/setAuthor/expected/repo/myfile31
-rw-r--r--test/integration/setAuthor/recording.json1
-rw-r--r--test/integration/setAuthor/setup.sh24
-rw-r--r--test/integration/setAuthor/test.json4
26 files changed, 63 insertions, 0 deletions
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/setAuthor/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 000000000..c23aa0355
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1 @@
+myfile3
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/FETCH_HEAD b/test/integration/setAuthor/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/FETCH_HEAD
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/HEAD b/test/integration/setAuthor/expected/repo/.git_keep/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/config b/test/integration/setAuthor/expected/repo/.git_keep/config
new file mode 100644
index 000000000..85e571409
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/config
@@ -0,0 +1,10 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+ ignorecase = true
+ precomposeunicode = true
+[user]
+ email = Author2@example.com
+ name = Author2
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/description b/test/integration/setAuthor/expected/repo/.git_keep/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/index b/test/integration/setAuthor/expected/repo/.git_keep/index
new file mode 100644
index 000000000..78afb6d69
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/index
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/info/exclude b/test/integration/setAuthor/expected/repo/.git_keep/info/exclude
new file mode 100644
index 000000000..8e9f2071f
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/info/exclude
@@ -0,0 +1,7 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
+.DS_Store
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/logs/HEAD b/test/integration/setAuthor/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..38d45fb5d
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,4 @@
+0000000000000000000000000000000000000000 2075aeb39a2a66a9607860a65b2a71c517760254 Author1 <Author1@example.com> 1652008089 +1000 commit (initial): myfile1
+2075aeb39a2a66a9607860a65b2a71c517760254 d01c8bb001458d0a7c01193813685c658e0355ac Author1 <Author1@example.com> 1652008089 +1000 commit: myfile2
+d01c8bb001458d0a7c01193813685c658e0355ac 8710ece70b7db9638b9645e93abdbcf210fa4595 Author2 <Author2@example.com> 1652008089 +1000 commit: myfile3
+8710ece70b7db9638b9645e93abdbcf210fa4595 baf3189129ba8878ba9b4107eaaaf3389287259b Author2 <Author2@example.com> 1652008097 +1000 commit (amend): myfile3
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/setAuthor/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..38d45fb5d
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1,4 @@
+0000000000000000000000000000000000000000 2075aeb39a2a66a9607860a65b2a71c517760254 Author1 <Author1@example.com> 1652008089 +1000 commit (initial): myfile1
+2075aeb39a2a66a9607860a65b2a71c517760254 d01c8bb001458d0a7c01193813685c658e0355ac Author1 <Author1@example.com> 1652008089 +1000 commit: myfile2
+d01c8bb001458d0a7c01193813685c658e0355ac 8710ece70b7db9638b9645e93abdbcf210fa4595 Author2 <Author2@example.com> 1652008089 +1000 commit: myfile3
+8710ece70b7db9638b9645e93abdbcf210fa4595 baf3189129ba8878ba9b4107eaaaf3389287259b Author2 <Author2@example.com> 1652008097 +1000 commit (amend): myfile3
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/setAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52
new file mode 100644
index 000000000..7f2ebf4ee
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/setAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
new file mode 100644
index 000000000..f74bf2335
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/20/75aeb39a2a66a9607860a65b2a71c517760254 b/test/integration/setAuthor/expected/repo/.git_keep/objects/20/75aeb39a2a66a9607860a65b2a71c517760254
new file mode 100644
index 000000000..ce4b3233f
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/20/75aeb39a2a66a9607860a65b2a71c517760254
@@ -0,0 +1,2 @@
+xQ
+0D)_ݸn%M6Xhz{xfx0ob-em@"ČAq2MF*I#/|N9l\cSҵGT ~+nFȋ5' \ No newline at end of file
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/setAuthor/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce
new file mode 100644
index 000000000..0a734f981
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/87/10ece70b7db9638b9645e93abdbcf210fa4595 b/test/integration/setAuthor/expected/repo/.git_keep/objects/87/10ece70b7db9638b9645e93abdbcf210fa4595
new file mode 100644
index 000000000..573b0d49c
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/87/10ece70b7db9638b9645e93abdbcf210fa4595
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/setAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
new file mode 100644
index 000000000..285df3e5f
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/setAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416
new file mode 100644
index 000000000..96d2e71a6
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/ba/f3189129ba8878ba9b4107eaaaf3389287259b b/test/integration/setAuthor/expected/repo/.git_keep/objects/ba/f3189129ba8878ba9b4107eaaaf3389287259b
new file mode 100644
index 000000000..18a5ff1cd
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/ba/f3189129ba8878ba9b4107eaaaf3389287259b
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/d0/1c8bb001458d0a7c01193813685c658e0355ac b/test/integration/setAuthor/expected/repo/.git_keep/objects/d0/1c8bb001458d0a7c01193813685c658e0355ac
new file mode 100644
index 000000000..e9d69bf0f
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/d0/1c8bb001458d0a7c01193813685c658e0355ac
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/setAuthor/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b
new file mode 100644
index 000000000..9b771fc2f
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b
Binary files differ
diff --git a/test/integration/setAuthor/expected/repo/.git_keep/refs/heads/master b/test/integration/setAuthor/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..2499d7343
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+baf3189129ba8878ba9b4107eaaaf3389287259b
diff --git a/test/integration/setAuthor/expected/repo/myfile1 b/test/integration/setAuthor/expected/repo/myfile1
new file mode 100644
index 000000000..a5bce3fd2
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/myfile1
@@ -0,0 +1 @@
+test1
diff --git a/test/integration/setAuthor/expected/repo/myfile2 b/test/integration/setAuthor/expected/repo/myfile2
new file mode 100644
index 000000000..180cf8328
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/myfile2
@@ -0,0 +1 @@
+test2
diff --git a/test/integration/setAuthor/expected/repo/myfile3 b/test/integration/setAuthor/expected/repo/myfile3
new file mode 100644
index 000000000..df6b0d2bc
--- /dev/null
+++ b/test/integration/setAuthor/expected/repo/myfile3
@@ -0,0 +1 @@
+test3
diff --git a/test/integration/setAuthor/recording.json b/test/integration/setAuthor/recording.json
new file mode 100644
index 000000000..9084af754
--- /dev/null
+++ b/test/integration/setAuthor/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":1118,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1382,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2654,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3632,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4070,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6702,"Mod":0,"Key":9,"Ch":9},{"Timestamp":7486,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7899,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9141,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file
diff --git a/test/integration/setAuthor/setup.sh b/test/integration/setAuthor/setup.sh
new file mode 100644
index 000000000..2eeb4d549
--- /dev/null
+++ b/test/integration/setAuthor/setup.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+cd $1
+
+git init
+
+git config user.email "Author1@example.com"
+git config user.name "Author1"
+
+echo test1 > myfile1
+git add .
+git commit -am "myfile1"
+echo test2 > myfile2
+git add .
+git commit -am "myfile2"
+
+git config user.email "Author2@example.com"
+git config user.name "Author2"
+
+echo test3 > myfile3
+git add .
+git commit -am "myfile3"
diff --git a/test/integration/setAuthor/test.json b/test/integration/setAuthor/test.json
new file mode 100644
index 000000000..c8426b12c
--- /dev/null
+++ b/test/integration/setAuthor/test.json
@@ -0,0 +1,4 @@
+{
+ "description": "In this test the author of a commit is set to a different name/email.",
+ "speed": 5
+}