The branch, hooks has been updated
       via  91864cfde34a8810d5f36164b5cd92c7d1699351 (commit)
      from  8111f94ad25ddcb399946b75cc3138910bfb516a (commit)

- Log -----------------------------------------------------------------
commit 91864cfde34a8810d5f36164b5cd92c7d1699351
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Use new prepare flags for has-session
---
 cmd-new-session.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/cmd-new-session.c b/cmd-new-session.c
index e244f88..6057d1c 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -49,7 +49,7 @@ const struct cmd_entry cmd_has_session_entry = {
        "has-session", "has",
        "t:", 0, 0,
        CMD_TARGET_SESSION_USAGE,
-       0,
+       CMD_PREP_SESSION_T,
        cmd_new_session_exec
 };
 
@@ -72,8 +72,10 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
        struct environ_entry    *envent;
 
        if (self->entry == &cmd_has_session_entry) {
-               if (cmd_find_session(cmdq, args_get(args, 't'), 0) == NULL)
-                       return (CMD_RETURN_ERROR);
+               /*
+                * cmd_prepare() will fail if the session cannot be found,
+                * hence always return success here.
+                */
                return (CMD_RETURN_NORMAL);
        }
 


-----------------------------------------------------------------------

Summary of changes:
 cmd-new-session.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to