git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 14/17] Move declaration for alias.c to alias.h

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
May 20, 2018, 18:40 UTC
Message-ID
<20180520184009.976-15-pclouds@gmail.com>
In-Reply-To
<20180520184009.976-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 alias.c         | 1 +
 alias.h         | 9 +++++++++
 builtin/help.c  | 1 +
 builtin/merge.c | 1 +
 cache.h         | 5 -----
 connect.c       | 1 +
 git.c           | 1 +
 pager.c         | 1 +
 sequencer.c     | 1 +
 shell.c         | 1 +
 10 files changed, 17 insertions(+), 5 deletions(-)
 create mode 100644 alias.h
diff --git a/alias.c b/alias.c
index bf146e5263..e9726ce8c5 100644
--- a/alias.c
+++ b/alias.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "alias.h"
 #include "config.h"
 
 struct config_alias_data {
diff --git a/alias.h b/alias.h
new file mode 100644
index 0000000000..fbf1d22a94
--- /dev/null
+++ b/alias.h
@@ -0,0 +1,9 @@
+#ifndef __ALIAS_H__
+#define __ALIAS_H__
+
+char *alias_lookup(const char *alias);
+int split_cmdline(char *cmdline, const char ***argv);
+/* Takes a negative value returned by split_cmdline */
+const char *split_cmdline_strerror(int cmdline_errno);
+
+#endif
diff --git a/builtin/help.c b/builtin/help.c
index 5727fb5e51..6b4b3df90d 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -9,6 +9,7 @@
 #include "run-command.h"
 #include "column.h"
 #include "help.h"
+#include "alias.h"
 
 #ifndef DEFAULT_HELP_FORMAT
 #define DEFAULT_HELP_FORMAT "man"
diff --git a/builtin/merge.c b/builtin/merge.c
index 9db5a2cf16..e3681cd850 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -34,6 +34,7 @@
 #include "string-list.h"
 #include "packfile.h"
 #include "tag.h"
+#include "alias.h"
 
 #define DEFAULT_TWOHEAD (1<<0)
 #define DEFAULT_OCTOPUS (1<<1)
diff --git a/cache.h b/cache.h
index bbaf5c349a..111116ea13 100644
--- a/cache.h
+++ b/cache.h
@@ -1835,11 +1835,6 @@ extern int ws_blank_line(const char *line, int len, unsigned ws_rule);
 void overlay_tree_on_index(struct index_state *istate,
 			   const char *tree_name, const char *prefix);
 
-char *alias_lookup(const char *alias);
-int split_cmdline(char *cmdline, const char ***argv);
-/* Takes a negative value returned by split_cmdline */
-const char *split_cmdline_strerror(int cmdline_errno);
-
 /* setup.c */
 struct startup_info {
 	int have_repository;
diff --git a/connect.c b/connect.c
index c3a014c5ba..ff078d28dc 100644
--- a/connect.c
+++ b/connect.c
@@ -13,6 +13,7 @@
 #include "transport.h"
 #include "strbuf.h"
 #include "protocol.h"
+#include "alias.h"
 
 static char *server_capabilities;
 static const char *parse_feature_value(const char *, const char *, int *);
diff --git a/git.c b/git.c
index 4d5b8a9931..19f73b3fa3 100644
--- a/git.c
+++ b/git.c
@@ -3,6 +3,7 @@
 #include "exec_cmd.h"
 #include "help.h"
 #include "run-command.h"
+#include "alias.h"
 
 #define RUN_SETUP		(1<<0)
 #define RUN_SETUP_GENTLY	(1<<1)
diff --git a/pager.c b/pager.c
index 92b23e6cd1..1f4688fa03 100644
--- a/pager.c
+++ b/pager.c
@@ -2,6 +2,7 @@
 #include "config.h"
 #include "run-command.h"
 #include "sigchain.h"
+#include "alias.h"
 
 #ifndef DEFAULT_PAGER
 #define DEFAULT_PAGER "less"
diff --git a/sequencer.c b/sequencer.c
index 667f35ebdf..1288a36ebd 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -23,6 +23,7 @@
 #include "hashmap.h"
 #include "notes-utils.h"
 #include "sigchain.h"
+#include "alias.h"
 
 #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
 
diff --git a/shell.c b/shell.c
index 234b2d4f16..3ce77b8e34 100644
--- a/shell.c
+++ b/shell.c
@@ -3,6 +3,7 @@
 #include "exec_cmd.h"
 #include "strbuf.h"
 #include "run-command.h"
+#include "alias.h"
 
 #define COMMAND_DIR "git-shell-commands"
 #define HELP_COMMAND COMMAND_DIR "/help"
-- 
2.17.0.705.g3525833791
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 30 of 40 in “nd/command-list updates”
  1. 00/14 nd/command-list updatesNguyễn Thái Ngọc Duy, May 19, 2018
  2. 01/14 generate-cmds.sh: factor out synopsis extract codeNguyễn Thái Ngọc Duy, May 19, 2018
  3. 02/14 generate-cmds.sh: export all commands to command-list.hNguyễn Thái Ngọc Duy, May 19, 2018
  4. 06/14 git --list-cmds: collect command list in a string_listNguyễn Thái Ngọc Duy, May 19, 2018
  5. 07/14 completion: implement and use --list-cmds=main,othersNguyễn Thái Ngọc Duy, May 19, 2018
  6. 09/14 help: add "-a --verbose" to list all commands with synopsisNguyễn Thái Ngọc Duy, May 19, 2018
  7. 08/14 git: support --list-cmds=list-<category>Nguyễn Thái Ngọc Duy, May 19, 2018
  8. 05/14 git.c: convert --list-* to --list-cmds=*Nguyễn Thái Ngọc Duy, May 19, 2018
  9. 04/14 Remove common-cmds.hNguyễn Thái Ngọc Duy, May 19, 2018
  10. 14/14 completion: allow to customize the completable command listNguyễn Thái Ngọc Duy, May 19, 2018
  11. SZEDER GáborMay 20, 2018
  12. Duy NguyenMay 20, 2018
  13. 13/14 completion: reduce completable command listNguyễn Thái Ngọc Duy, May 19, 2018
  14. SZEDER GáborMay 20, 2018
  15. Junio C HamanoMay 21, 2018
  16. 10/14 help: use command-list.txt for the source of guidesNguyễn Thái Ngọc Duy, May 19, 2018
  17. 03/14 help: use command-list.h for common command listNguyễn Thái Ngọc Duy, May 19, 2018
  18. 11/14 command-list.txt: documentation and guide lineNguyễn Thái Ngọc Duy, May 19, 2018
  19. 12/14 completion: let git provide the completable command listNguyễn Thái Ngọc Duy, May 19, 2018
  20. SZEDER GáborMay 20, 2018
  21. Duy NguyenMay 20, 2018
  22. 00/17 nd/command-list updatesNguyễn Thái Ngọc Duy, May 20, 2018
  23. 01/17 generate-cmds.sh: factor out synopsis extract codeNguyễn Thái Ngọc Duy, May 20, 2018
  24. 02/17 generate-cmds.sh: export all commands to command-list.hNguyễn Thái Ngọc Duy, May 20, 2018
  25. 03/17 help: use command-list.h for common command listNguyễn Thái Ngọc Duy, May 20, 2018
  26. 07/17 completion: implement and use --list-cmds=main,othersNguyễn Thái Ngọc Duy, May 20, 2018
  27. 06/17 git --list-cmds: collect command list in a string_listNguyễn Thái Ngọc Duy, May 20, 2018
  28. 08/17 git: support --list-cmds=list-<category>Nguyễn Thái Ngọc Duy, May 20, 2018
  29. 13/17 completion: reduce completable command listNguyễn Thái Ngọc Duy, May 20, 2018
  30. 14/17 Move declaration for alias.c to alias.hNguyễn Thái Ngọc Duy, May 20, 2018
  31. 15/17 completion: add and use --list-cmds=nohelpersNguyễn Thái Ngọc Duy, May 20, 2018
  32. 12/17 completion: let git provide the completable command listNguyễn Thái Ngọc Duy, May 20, 2018
  33. 11/17 command-list.txt: documentation and guide lineNguyễn Thái Ngọc Duy, May 20, 2018
  34. 10/17 help: use command-list.txt for the source of guidesNguyễn Thái Ngọc Duy, May 20, 2018
  35. Ævar Arnfjörð BjarmasonNov 20, 2018
  36. 17/17 completion: allow to customize the completable command listNguyễn Thái Ngọc Duy, May 20, 2018
  37. 16/17 completion: add and use --list-cmds=aliasNguyễn Thái Ngọc Duy, May 20, 2018
  38. 05/17 git.c: convert --list-* to --list-cmds=*Nguyễn Thái Ngọc Duy, May 20, 2018
  39. 04/17 Remove common-cmds.hNguyễn Thái Ngọc Duy, May 20, 2018
  40. 09/17 help: add "-a --verbose" to list all commands with synopsisNguyễn Thái Ngọc Duy, May 20, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.