Author: rinrab
Date: Wed May 28 14:09:36 2025
New Revision: 1925905

URL: http://svn.apache.org/viewvc?rev=1925905&view=rev
Log:
svnmucc: Use svn_cstring_casecmp() instead of strcmp() to check whether
operation is to be perform over head revision. This simplifies the code
and fixes issues when revision like `Head` is specified (which doesn't
match `head` or `HEAD`).

* subversion/svnmucc/svnmucc.c
  (sub_main): ditto.

Modified:
    subversion/trunk/subversion/svnmucc/svnmucc.c

Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1925905&r1=1925904&r2=1925905&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Wed May 28 14:09:36 2025
@@ -821,9 +821,7 @@ sub_main(int *exit_code,
       if (action->action == ACTION_CP)
         {
           const char *rev_str = APR_ARRAY_IDX(action_args, i, const char *);
-          if (strcmp(rev_str, "head") == 0)
-            action->rev = SVN_INVALID_REVNUM;
-          else if (strcmp(rev_str, "HEAD") == 0)
+          if (svn_cstring_casecmp(rev_str, "head") == 0)
             action->rev = SVN_INVALID_REVNUM;
           else
             {


Reply via email to