Commit db64eb6
for-each-ref: avoid color leakage
To make sure that an invocation like the following doesn't leak color,
$ git for-each-ref --format='%(subject)%(color:green)'
auto-reset at the end of the format string when the last color token
seen in the format string isn't a color-reset.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent fddb74c commit db64eb6
2 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
| 188 | + | |
| 189 | + | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
187 | | - | |
| 193 | + | |
188 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
914 | 923 | | |
915 | 924 | | |
916 | 925 | | |
917 | | - | |
| 926 | + | |
918 | 927 | | |
919 | | - | |
920 | 928 | | |
921 | | - | |
922 | 929 | | |
923 | 930 | | |
924 | 931 | | |
| |||
985 | 992 | | |
986 | 993 | | |
987 | 994 | | |
| 995 | + | |
| 996 | + | |
988 | 997 | | |
989 | 998 | | |
990 | 999 | | |
991 | | - | |
| 1000 | + | |
| 1001 | + | |
992 | 1002 | | |
993 | 1003 | | |
994 | 1004 | | |
995 | 1005 | | |
996 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
997 | 1015 | | |
998 | 1016 | | |
999 | 1017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
0 commit comments