Skip to content

Commit

Permalink
Start conforming code to "git subcmd" style
Browse files Browse the repository at this point in the history
User notifications are presented as 'git cmd', and code comments
are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Heikki Orsila authored and Junio C Hamano committed Aug 30, 2008
1 parent 53d1589 commit 34baebc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static void say_patch_name(FILE *output, const char *pre,
static void read_patch_file(struct strbuf *sb, int fd)
{
if (strbuf_read(sb, fd, 0) < 0)
die("git-apply: read returned %s", strerror(errno));
die("git apply: read returned %s", strerror(errno));

/*
* Make sure that we have some slop in the buffer
Expand Down
8 changes: 4 additions & 4 deletions builtin-archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ static int run_remote_archiver(const char *remote, int argc,

len = packet_read_line(fd[0], buf, sizeof(buf));
if (!len)
die("git-archive: expected ACK/NAK, got EOF");
die("git archive: expected ACK/NAK, got EOF");
if (buf[len-1] == '\n')
buf[--len] = 0;
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
die("git-archive: NACK %s", buf + 5);
die("git-archive: protocol error");
die("git archive: NACK %s", buf + 5);
die("git archive: protocol error");
}

len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
die("git-archive: expected a flush");
die("git archive: expected a flush");

/* Now, start reading from fd[0] and spit it out to stdout */
rv = recv_sideband("archive", fd[0], 1, 2);
Expand Down
2 changes: 1 addition & 1 deletion builtin-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ static int prepare_lines(struct scoreboard *sb)

/*
* Add phony grafts for use with -S; this is primarily to
* support git-cvsserver that wants to give a linear history
* support git's cvsserver that wants to give a linear history
* to its clients.
*/
static int read_ancestry(const char *graft_file)
Expand Down
4 changes: 2 additions & 2 deletions builtin-bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Basic handler for bundle files to connect repositories via sneakernet.
* Invocation must include action.
* This function can create a bundle or provide information on an existing
* bundle supporting git-fetch, git-pull, and git-ls-remote
* bundle supporting "fetch", "pull", and "ls-remote".
*/

static const char *bundle_usage="git-bundle (create <bundle> <git-rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
static const char *bundle_usage="git bundle (create <bundle> <git rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";

int cmd_bundle(int argc, const char **argv, const char *prefix)
{
Expand Down
4 changes: 2 additions & 2 deletions builtin-cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
break;

default:
die("git-cat-file: unknown option: %s\n", exp_type);
die("git cat-file: unknown option: %s\n", exp_type);
}

if (!buf)
die("git-cat-file %s: bad file", obj_name);
die("git cat-file %s: bad file", obj_name);

write_or_die(1, buf, size);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion builtin-check-ref-format.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
{
if (argc != 2)
usage("git-check-ref-format refname");
usage("git check-ref-format refname");
return !!check_ref_format(argv[1]);
}

0 comments on commit 34baebc

Please sign in to comment.