diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/am.c | 2 | ||||
-rw-r--r-- | builtin/cat-file.c | 2 | ||||
-rw-r--r-- | builtin/checkout.c | 6 | ||||
-rw-r--r-- | builtin/symbolic-ref.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/builtin/am.c b/builtin/am.c index 739b34dcf2..9e2ae5cba4 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -2222,7 +2222,7 @@ int cmd_am(int argc, const char **argv, const char *prefix) int in_progress; const char * const usage[] = { - N_("git am [<options>] [(<mbox>|<Maildir>)...]"), + N_("git am [<options>] [(<mbox> | <Maildir>)...]"), N_("git am [<options>] (--continue | --skip | --abort)"), NULL }; diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 2dfe6265f7..560f6c2cc7 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -440,7 +440,7 @@ static int batch_objects(struct batch_options *opt) } static const char * const cat_file_usage[] = { - N_("git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>"), + N_("git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv) <object>"), N_("git cat-file (--batch | --batch-check) [--follow-symlinks]"), NULL }; diff --git a/builtin/checkout.c b/builtin/checkout.c index 8672d0724f..afbff3e790 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -154,8 +154,8 @@ static int check_stages(unsigned stages, const struct cache_entry *ce, int pos) return 0; } -static int checkout_stage(int stage, struct cache_entry *ce, int pos, - struct checkout *state) +static int checkout_stage(int stage, const struct cache_entry *ce, int pos, + const struct checkout *state) { while (pos < active_nr && !strcmp(active_cache[pos]->name, ce->name)) { @@ -169,7 +169,7 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos, return error(_("path '%s' does not have their version"), ce->name); } -static int checkout_merged(int pos, struct checkout *state) +static int checkout_merged(int pos, const struct checkout *state) { struct cache_entry *ce = active_cache[pos]; const char *path = ce->name; diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c index 9c29a64e43..96eed94468 100644 --- a/builtin/symbolic-ref.c +++ b/builtin/symbolic-ref.c @@ -56,6 +56,8 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix) ret = check_symref(argv[0], 1, 0, 0); if (ret) die("Cannot delete %s, not a symbolic ref", argv[0]); + if (!strcmp(argv[0], "HEAD")) + die("deleting '%s' is not allowed", argv[0]); return delete_ref(argv[0], NULL, REF_NODEREF); } |