[v2,07/16] read-cache.c: add missing colon separators
diff mbox series

Message ID 20181105192059.20303-8-pclouds@gmail.com
State New
Headers show
Series
  • Mark more strings for translation
Related show

Commit Message

Duy Nguyen Nov. 5, 2018, 7:20 p.m. UTC
typechange_fmt and added_fmt should have a colon before "needs
update". Align the statements to make it easier to read and see. Also
drop the unnecessary ().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 read-cache.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Junio C Hamano Nov. 6, 2018, 2:12 a.m. UTC | #1
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> typechange_fmt and added_fmt should have a colon before "needs
> update". Align the statements to make it easier to read and see. Also
> drop the unnecessary ().
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  read-cache.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Sensible.  Thanks.

> diff --git a/read-cache.c b/read-cache.c
> index 858befe738..8d99ae376c 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -1492,11 +1492,11 @@ int refresh_index(struct index_state *istate, unsigned int flags,
>  						  istate->cache_nr);
>  
>  	trace_performance_enter();
> -	modified_fmt = (in_porcelain ? "M\t%s\n" : "%s: needs update\n");
> -	deleted_fmt = (in_porcelain ? "D\t%s\n" : "%s: needs update\n");
> -	typechange_fmt = (in_porcelain ? "T\t%s\n" : "%s needs update\n");
> -	added_fmt = (in_porcelain ? "A\t%s\n" : "%s needs update\n");
> -	unmerged_fmt = (in_porcelain ? "U\t%s\n" : "%s: needs merge\n");
> +	modified_fmt   = in_porcelain ? "M\t%s\n" : "%s: needs update\n";
> +	deleted_fmt    = in_porcelain ? "D\t%s\n" : "%s: needs update\n";
> +	typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
> +	added_fmt      = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
> +	unmerged_fmt   = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
>  	for (i = 0; i < istate->cache_nr; i++) {
>  		struct cache_entry *ce, *new_entry;
>  		int cache_errno = 0;

Patch
diff mbox series

diff --git a/read-cache.c b/read-cache.c
index 858befe738..8d99ae376c 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1492,11 +1492,11 @@  int refresh_index(struct index_state *istate, unsigned int flags,
 						  istate->cache_nr);
 
 	trace_performance_enter();
-	modified_fmt = (in_porcelain ? "M\t%s\n" : "%s: needs update\n");
-	deleted_fmt = (in_porcelain ? "D\t%s\n" : "%s: needs update\n");
-	typechange_fmt = (in_porcelain ? "T\t%s\n" : "%s needs update\n");
-	added_fmt = (in_porcelain ? "A\t%s\n" : "%s needs update\n");
-	unmerged_fmt = (in_porcelain ? "U\t%s\n" : "%s: needs merge\n");
+	modified_fmt   = in_porcelain ? "M\t%s\n" : "%s: needs update\n";
+	deleted_fmt    = in_porcelain ? "D\t%s\n" : "%s: needs update\n";
+	typechange_fmt = in_porcelain ? "T\t%s\n" : "%s: needs update\n";
+	added_fmt      = in_porcelain ? "A\t%s\n" : "%s: needs update\n";
+	unmerged_fmt   = in_porcelain ? "U\t%s\n" : "%s: needs merge\n";
 	for (i = 0; i < istate->cache_nr; i++) {
 		struct cache_entry *ce, *new_entry;
 		int cache_errno = 0;