]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fast-import.c
use 'commit-ish' instead of 'committish'
[thirdparty/git.git] / fast-import.c
index 5f539d7d8f7e087423734fb1d19e0d5e580fbe6e..f5babae9a6fa68355b8d11992734ebf999ba012f 100644 (file)
@@ -22,8 +22,8 @@ Format of STDIN stream:
     ('author' (sp name)? sp '<' email '>' sp when lf)?
     'committer' (sp name)? sp '<' email '>' sp when lf
     commit_msg
-    ('from' sp committish lf)?
-    ('merge' sp committish lf)*
+    ('from' sp commit-ish lf)?
+    ('merge' sp commit-ish lf)*
     (file_change | ls)*
     lf?;
   commit_msg ::= data;
@@ -43,18 +43,18 @@ Format of STDIN stream:
   file_obm ::= 'M' sp mode sp (hexsha1 | idnum) sp path_str lf;
   file_inm ::= 'M' sp mode sp 'inline' sp path_str lf
     data;
-  note_obm ::= 'N' sp (hexsha1 | idnum) sp committish lf;
-  note_inm ::= 'N' sp 'inline' sp committish lf
+  note_obm ::= 'N' sp (hexsha1 | idnum) sp commit-ish lf;
+  note_inm ::= 'N' sp 'inline' sp commit-ish lf
     data;
 
   new_tag ::= 'tag' sp tag_str lf
-    'from' sp committish lf
+    'from' sp commit-ish lf
     ('tagger' (sp name)? sp '<' email '>' sp when lf)?
     tag_msg;
   tag_msg ::= data;
 
   reset_branch ::= 'reset' sp ref_str lf
-    ('from' sp committish lf)?
+    ('from' sp commit-ish lf)?
     lf?;
 
   checkpoint ::= 'checkpoint' lf
@@ -93,7 +93,7 @@ Format of STDIN stream:
      # stream formatting is: \, " and LF.  Otherwise these values
      # are UTF8.
      #
-  committish  ::= (ref_str | hexsha1 | sha1exp_str | idnum);
+  commit-ish  ::= (ref_str | hexsha1 | sha1exp_str | idnum);
   ref_str     ::= ref;
   sha1exp_str ::= sha1exp;
   tag_str     ::= tag;
@@ -297,7 +297,7 @@ static int failure;
 static FILE *pack_edges;
 static unsigned int show_stats = 1;
 static int global_argc;
-static const char **global_argv;
+static char **global_argv;
 
 /* Memory pools */
 static size_t mem_pool_alloc = 2*1024*1024 - sizeof(struct mem_pool);
@@ -1822,7 +1822,7 @@ static void read_marks(void)
                *end = 0;
                mark = strtoumax(line + 1, &end, 10);
                if (!mark || end == line + 1
-                       || *end != ' ' || get_sha1(end + 1, sha1))
+                       || *end != ' ' || get_sha1_hex(end + 1, sha1))
                        die("corrupt mark line: %s", line);
                e = find_object(sha1);
                if (!e) {
@@ -2478,7 +2478,7 @@ static void note_change_n(struct branch *b, unsigned char *old_fanout)
        assert(*p == ' ');
        p++;  /* skip space */
 
-       /* <committish> */
+       /* <commit-ish> */
        s = lookup_branch(p);
        if (s) {
                if (is_null_sha1(s->sha1))
@@ -2957,7 +2957,7 @@ static struct object_entry *dereference(struct object_entry *oe,
        case OBJ_TAG:
                break;
        default:
-               die("Not a treeish: %s", command_buf.buf);
+               die("Not a tree-ish: %s", command_buf.buf);
        }
 
        if (oe->pack_id != MAX_PACK_ID) {       /* in a pack being written */
@@ -3041,7 +3041,7 @@ static void parse_ls(struct branch *b)
        struct tree_entry *root = NULL;
        struct tree_entry leaf = {NULL};
 
-       /* ls SP (<treeish> SP)? <path> */
+       /* ls SP (<tree-ish> SP)? <path> */
        p = command_buf.buf + strlen("ls ");
        if (*p == '"') {
                if (!b)
@@ -3347,7 +3347,7 @@ static void parse_argv(void)
                read_marks();
 }
 
-int main(int argc, const char **argv)
+int main(int argc, char **argv)
 {
        unsigned int i;