Skip to content

Commit bf755a7

Browse files
committed
psuh: add a built-in by popular demand
Internal metrics indicate this is a command many users expect to be present. So here's an implementation to help drive customer satisfaction and engagement: a pony which doubtfully greets the user, or, a Pony Saying "Um, Hello" (PSUH). This commit message is intentionally formatted to 72 columns per line, starts with a single line as "commit message subject" that is written as if to command the codebase to do something (add this, teach a command that). The body of the message is designed to add information about the commit that is not readily deduced from reading the associated diff, such as answering the question "why?". Signed-off-by: Long Nguyen <n.h.long.9697@gmail.com>
1 parent 2565546 commit bf755a7

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
/git-prune-packed
127127
/git-pull
128128
/git-push
129+
/git-psuh
129130
/git-quiltimport
130131
/git-range-diff
131132
/git-read-tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ BUILTIN_OBJS += builtin/patch-id.o
14591459
BUILTIN_OBJS += builtin/prune-packed.o
14601460
BUILTIN_OBJS += builtin/prune.o
14611461
BUILTIN_OBJS += builtin/pull.o
1462+
BUILTIN_OBJS += builtin/psuh.o
14621463
BUILTIN_OBJS += builtin/push.o
14631464
BUILTIN_OBJS += builtin/range-diff.o
14641465
BUILTIN_OBJS += builtin/read-tree.o

builtin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,6 @@ int cmd_verify_pack(int argc, const char **argv, const char *prefix, struct repo
282282
int cmd_show_ref(int argc, const char **argv, const char *prefix, struct repository *repo);
283283
int cmd_pack_refs(int argc, const char **argv, const char *prefix, struct repository *repo);
284284
int cmd_replace(int argc, const char **argv, const char *prefix, struct repository *repo);
285+
int cmd_psuh(int argc, const char **argv, const char *prefix, struct repository *repo);
285286

286287
#endif

builtin/psuh.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "builtin.h"
2+
#include "gettext.h"
3+
4+
int cmd_psuh(int argc UNUSED, const char **argv UNUSED,
5+
const char *prefix UNUSED, struct repository *repo UNUSED) {
6+
printf(_("Pony saying hello goes here.\n"));
7+
return 0;
8+
}

git.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ static struct cmd_struct commands[] = {
627627
{ "prune-packed", cmd_prune_packed, RUN_SETUP },
628628
{ "pull", cmd_pull, RUN_SETUP | NEED_WORK_TREE },
629629
{ "push", cmd_push, RUN_SETUP },
630+
{ "psuh", cmd_psuh, RUN_SETUP },
630631
{ "range-diff", cmd_range_diff, RUN_SETUP | USE_PAGER },
631632
{ "read-tree", cmd_read_tree, RUN_SETUP },
632633
{ "rebase", cmd_rebase, RUN_SETUP | NEED_WORK_TREE },

0 commit comments

Comments
 (0)