Further clean-up: usage() vs die()
This hopefully finishes the clean-up Ramsay started with recent commit15e593e4d3
and commit8cdf33643d
. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
8cdf33643d
commit
cba05fa840
@ -9,6 +9,6 @@
|
|||||||
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
|
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
|
||||||
{
|
{
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
usage("git check-ref-format refname");
|
usage("git-check-ref-format refname");
|
||||||
return !!check_ref_format(argv[1]);
|
return !!check_ref_format(argv[1]);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
|
|||||||
ignore_errors = 1;
|
ignore_errors = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
die(builtin_mv_usage);
|
usage(builtin_mv_usage);
|
||||||
}
|
}
|
||||||
count = argc - i - 1;
|
count = argc - i - 1;
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
#include "cache-tree.h"
|
#include "cache-tree.h"
|
||||||
|
|
||||||
static const char prune_usage[] = "git prune [-n]";
|
static const char prune_usage[] = "git-prune [-n]";
|
||||||
static int show_only = 0;
|
static int show_only = 0;
|
||||||
static struct rev_info revs;
|
static struct rev_info revs;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
|||||||
printf("rm '%s'\n", path);
|
printf("rm '%s'\n", path);
|
||||||
|
|
||||||
if (remove_file_from_cache(path))
|
if (remove_file_from_cache(path))
|
||||||
die("git rm: unable to remove %s", path);
|
die("git-rm: unable to remove %s", path);
|
||||||
cache_tree_invalidate_path(active_cache_tree, path);
|
cache_tree_invalidate_path(active_cache_tree, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!removed)
|
if (!removed)
|
||||||
die("git rm: %s: %s", path, strerror(errno));
|
die("git-rm: %s: %s", path, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user