{"thread":{"id":"16504","subject":"[PATCH 1/5] Change separator from '/' to ',' in add --patch","startedAt":"2008-11-27T21:10:11Z","lastAt":"2008-11-27T21:10:11Z","messageCount":1,"participants":["William Pursell"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"96635","messageId":"492F0CB3.7010506@gmail.com","threadId":"16504","inReplyTo":null,"subject":"[PATCH 1/5] Change separator from '/' to ',' in add --patch","fromName":"William Pursell","fromEmail":"bill.pursell@gmail.com","sentAt":"2008-11-27T21:10:11Z","receivedAt":"2008-11-27T21:10:11Z","isPatch":true,"sender":{"key":"bill.pursell@gmail.com","avatar":"https://gravatar.com/avatar/3ab4313e5dfdc1fedb65206d829ba33f71f56f26e11326979d1b99d5e1c403c9?d=mp&s=160"},"body":"\n\nThis also simplifies the code some by localizing the\nseparator to the join at line 923.\n---\n  git-add--interactive.perl |   17 +++++++++--------\n  1 files changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/git-add--interactive.perl b/git-add--interactive.perl\nindex b0223c3..6e474d0 100755\n--- a/git-add--interactive.perl\n+++ b/git-add--interactive.perl\n@@ -879,7 +879,7 @@ sub patch_update_file {\n\n  \twhile (1) {\n  \t\tmy ($prev, $next, $other, $undecided, $i);\n-\t\t$other = '';\n+\t\t$other = 'ynad';\n\n  \t\tif ($num <= $ix) {\n  \t\t\t$ix = 0;\n@@ -887,22 +887,22 @@ sub patch_update_file {\n  \t\tfor ($i = 0; $i < $ix; $i++) {\n  \t\t\tif (!defined $hunk[$i]{USE}) {\n  \t\t\t\t$prev = 1;\n-\t\t\t\t$other .= '/k';\n+\t\t\t\t$other .= 'k';\n  \t\t\t\tlast;\n  \t\t\t}\n  \t\t}\n  \t\tif ($ix) {\n-\t\t\t$other .= '/K';\n+\t\t\t$other .= 'K';\n  \t\t}\n  \t\tfor ($i = $ix + 1; $i < $num; $i++) {\n  \t\t\tif (!defined $hunk[$i]{USE}) {\n  \t\t\t\t$next = 1;\n-\t\t\t\t$other .= '/j';\n+\t\t\t\t$other .= 'j';\n  \t\t\t\tlast;\n  \t\t\t}\n  \t\t}\n  \t\tif ($ix < $num - 1) {\n-\t\t\t$other .= '/J';\n+\t\t\t$other .= 'J';\n  \t\t}\n  \t\tfor ($i = 0; $i < $num; $i++) {\n  \t\t\tif (!defined $hunk[$i]{USE}) {\n@@ -913,13 +913,14 @@ sub patch_update_file {\n  \t\tlast if (!$undecided);\n\n  \t\tif (hunk_splittable($hunk[$ix]{TEXT})) {\n-\t\t\t$other .= '/s';\n+\t\t\t$other .= 's';\n  \t\t}\n-\t\t$other .= '/e';\n+\t\t$other .= 'e?';\n  \t\tfor (@{$hunk[$ix]{DISPLAY}}) {\n  \t\t\tprint;\n  \t\t}\n-\t\tprint colored $prompt_color, \"Stage this hunk [y/n/a/d$other/?]? \";\n+\t\tprint colored $prompt_color, \"Stage this hunk [\" .\n+\t\t\t join (\",\", split( '', $other)) . \"]? \";\n  \t\tmy $line = <STDIN>;\n  \t\tif ($line) {\n  \t\t\tif ($line =~ /^y/i) {\n-- \n1.6.0.4.782.geea74.dirty\n\n\n-- \nWilliam Pursell\n"}]}