Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
---
 Documentation/config.txt | 3 ++-
 ls_colors.c              | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2090866..2290c47 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -944,7 +944,8 @@ color.ls.<slot>::
        Use customized color for file name colorization. If not set
        and the environment variable LS_COLORS is set, color settings
        from $LS_COLORS are used. `<slot>` can be `normal`, `file`,
-       `directory`, `symlink`, `fifo`, `socket`, `block`, `char`,
+       `directory`, `submodule`,
+       `symlink`, `fifo`, `socket`, `block`, `char`,
        `missing`, `orphan`, `executable`, `door`, `setuid`, `setgid`,
        `sticky`, `otherwritable`, `stickyotherwritable`, `cap`,
        `multihardlink`. The values of these variables may be
diff --git a/ls_colors.c b/ls_colors.c
index f84ef0f..011a8b9 100644
--- a/ls_colors.c
+++ b/ls_colors.c
@@ -29,6 +29,8 @@ enum color_ls {
        LS_MH,                  /* multi hardlink */
        LS_CL,                  /* clear end of line */
 
+       LS_SUBMODULE,
+
        MAX_LS
 };
 
@@ -58,7 +60,8 @@ static char ls_colors[MAX_LS][COLOR_MAXLEN] = {
        GIT_COLOR_BLACK_ON_GREEN,
        "",
        "",
-       ""
+       "",
+       GIT_COLOR_BOLD_BLUE
 };
 
 static const char *const indicator_name[] = {
@@ -73,6 +76,7 @@ static const char * const config_name[] = {
        "fifo", "socket", "block", "char", "missing", "orphan", "executable",
        "door", "setuid", "setgid", "sticky", "otherwritable",
        "stickyotherwritable", "cap", "multihardlink", "",
+       "submodule",
        NULL
 };
 
@@ -450,6 +454,8 @@ void color_filename(struct strbuf *sb, const char *name,
                        type = LS_DI;
        } else if (S_ISLNK(mode))
                type = (!linkok && *ls_colors[LS_OR]) ? LS_OR : LS_LN;
+       else if (S_ISGITLINK(mode))
+               type = LS_SUBMODULE;
        else if (S_ISFIFO(mode))
                type = LS_PI;
        else if (S_ISSOCK(mode))
-- 
2.3.0.rc1.137.g477eb31

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to