Re: [PATCH v2] status merge: guarentee space between msg and path

2014-03-12 Thread Junio C Hamano
Sandy Carter sandy.car...@savoirfairelinux.com writes:

 Seems fine except for the bit about returning _(bug), which I brought up.

 Seems to do the same thing as my proposal without changing the
 alignment of paths in of regular status output. No changes to tests
 necessary, less noisy.

 It works for me.

Thanks.  I'll work on a better split, then, and resend them later.
--
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


[PATCH v2] status merge: guarentee space between msg and path

2014-03-11 Thread Sandy Carter
Add space between how and one when printing status of unmerged data.
This fixes an appending of the how message when it is longer than 20,
such  is the case in some translations such as the french one where the
colon gets appended to the file:
supprimé par nous :wt-status.c
modifié des deux côtés :wt-status.h
Additionally, having a space makes the file in question easier to select
in console to quickly address the problem. Without the space, the colon
(and, sometimes the last word) of the message is selected along with the
file.

The previous french example should now print as, which is more proper:
supprimé par nous :  wt-status.c
modifié des deux côtés : wt-status.h

try 2:
Add function so wt_status_print_unmerged_data() and
wt_status_print_change_data() make use of the same padding technique
defined as wt_status_status_padding_string()

This has the additionnal advantage of aligning unmerged paths with paths
of regular statuses.

Signed-off-by: Sandy Carter sandy.car...@savoirfairelinux.com
---
 t/t7060-wtstatus.sh |  16 +++
 t/t7506-status-submodule.sh |  18 
 t/t7508-status.sh   |  94 +++
 t/t7512-status-help.sh  |  30 ++---
 wt-status.c | 104 +---
 5 files changed, 149 insertions(+), 113 deletions(-)

diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index 7d467c0..f49f3b3 100755
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
@@ -38,7 +38,7 @@ You have unmerged paths.
 Unmerged paths:
   (use git add/rm file... as appropriate to mark resolution)
 
-   deleted by us:  foo
+   deleted by us:   foo
 
 no changes added to commit (use git add and/or git commit -a)
 EOF
@@ -142,8 +142,8 @@ You have unmerged paths.
 Unmerged paths:
   (use git add/rm file... as appropriate to mark resolution)
 
-   both added: conflict.txt
-   deleted by them:main.txt
+   both added:  conflict.txt
+   deleted by them: main.txt
 
 no changes added to commit (use git add and/or git commit -a)
 EOF
@@ -175,9 +175,9 @@ You have unmerged paths.
 Unmerged paths:
   (use git add/rm file... as appropriate to mark resolution)
 
-   both deleted:   main.txt
-   added by them:  sub_master.txt
-   added by us:sub_second.txt
+   both deleted:main.txt
+   added by them:   sub_master.txt
+   added by us: sub_second.txt
 
 no changes added to commit (use git add and/or git commit -a)
 EOF
@@ -198,12 +198,12 @@ You have unmerged paths.
 
 Changes to be committed:
 
-   new file:   sub_master.txt
+   new file:sub_master.txt
 
 Unmerged paths:
   (use git rm file... to mark resolution)
 
-   both deleted:   main.txt
+   both deleted:main.txt
 
 Untracked files not listed (use -u option to show untracked files)
 EOF
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
index d31b34d..745d88b 100755
--- a/t/t7506-status-submodule.sh
+++ b/t/t7506-status-submodule.sh
@@ -38,7 +38,7 @@ test_expect_success 'status with modified file in submodule' '
(cd sub  git reset --hard) 
echo changed sub/foo 
git status output 
-   test_i18ngrep modified:   sub (modified content) output
+   test_i18ngrep modified:sub (modified content) output
 '
 
 test_expect_success 'status with modified file in submodule (porcelain)' '
@@ -53,7 +53,7 @@ test_expect_success 'status with modified file in submodule 
(porcelain)' '
 test_expect_success 'status with added file in submodule' '
(cd sub  git reset --hard  echo foo  git add foo) 
git status output 
-   test_i18ngrep modified:   sub (modified content) output
+   test_i18ngrep modified:sub (modified content) output
 '
 
 test_expect_success 'status with added file in submodule (porcelain)' '
@@ -68,7 +68,7 @@ test_expect_success 'status with untracked file in submodule' 
'
(cd sub  git reset --hard) 
echo content sub/new-file 
git status output 
-   test_i18ngrep modified:   sub (untracked content) output
+   test_i18ngrep modified:sub (untracked content) output
 '
 
 test_expect_success 'status -uno with untracked file in submodule' '
@@ -87,7 +87,7 @@ test_expect_success 'status with added and untracked file in 
submodule' '
(cd sub  git reset --hard  echo foo  git add foo) 
echo content sub/new-file 
git status output 
-   test_i18ngrep modified:   sub (modified content, untracked content) 
output
+   test_i18ngrep modified:sub (modified content, untracked 
content) output
 '
 
 test_expect_success 'status with added and untracked file in submodule 
(porcelain)' '
@@ -105,7 +105,7 @@ test_expect_success 'status with modified file in modified 
submodule' '
(cd sub  echo next change foo  git commit -m next change foo) 

echo changed sub/foo 
git