Thread (6 messages) flat view 6 messages, 6 authors, 2016-06-15

Re: [PATCH] rebase -i: add exec command to launch a shell command

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:14

Possibly related (same subject, not in this thread)

On Mon, Aug 2, 2010 at 10:03, Matthieu Moy [off-list ref] wrote:
+use usual shell commands like "cd". The commands are ran from the same
"are run from the same"
+directory as "rebase -i" was started (this directory is temporarily
+re-created if needed).
"was started in"
+file_must_exist () {
+    if ! [ -f "$1" ]; then
+       echo "file $1 not created."
+       false
+    fi
+}
+
+file_must_not_exist () {
+    if [ -f "$1" ]; then
+       echo "file $1 created while it shouldn't have. $2"
+       false
+    fi
+}
+
+dir_must_exist () {
+    if ! [ -d "$1" ]; then
+       echo "dir $1 does not exist."
+       false
+    fi
+}
+
+dir_must_not_exist () {
+    if [ -d "$1" ]; then
+       echo "dir $1 exists while it shouldn't. $2"
+       false
+    fi
+}
Leftover debugging code? Looks useful, but probably something we
should have in test-lib.sh as "git_test" as a wrapper for the "test"
built-in.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help