summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-02-11 21:02:53 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-02-11 21:02:53 +1100
commit3d343e9b574a2c99ebf5b30dc9a4dac2886f6d73 (patch)
treeef6b2f8c08a29349bcc56a16260dfefdb3ee872d /test
parenta3656154906c1117f9c9bbe100aa585e43417897 (diff)
parent3a607061a2303d9f45d308de652fbebe7300b43c (diff)
Merge branch 'master' into feature/rebasing
Diffstat (limited to 'test')
-rw-r--r--test/hooks/pre-push25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/hooks/pre-push b/test/hooks/pre-push
new file mode 100644
index 000000000..b7cb2e87b
--- /dev/null
+++ b/test/hooks/pre-push
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# test pre-push hook for testing the lazygit credentials view
+#
+# to enable, use:
+# chmod +x .git/hooks/pre-push
+#
+# this will hang if you're using git from the command line, so only enable this
+# when you are testing the credentials view in lazygit
+
+exec < /dev/tty
+
+echo -n "Username for 'github': "
+read username
+
+echo -n "Password for 'github': "
+read password
+
+if [ "$username" = "username" -a "$password" = "password" ]; then
+ echo "success"
+ exit 0
+fi
+
+>&2 echo "incorrect username/password"
+exit 1