git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] Name change: other -> commands.
@ 2008-11-27 21:10 William Pursell
  2008-11-28  1:27 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: William Pursell @ 2008-11-27 21:10 UTC (permalink / raw)
  To: git



This name more accurately reflects the use of the variable.
---
  git-add--interactive.perl |   30 +++++++++++++++---------------
  1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 6e474d0..b530597 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -878,8 +878,8 @@ sub patch_update_file {
  	$ix = 0;

  	while (1) {
-		my ($prev, $next, $other, $undecided, $i);
-		$other = 'ynad';
+		my ($prev, $next, $commands, $undecided, $i);
+		$commands = 'ynad';

  		if ($num <= $ix) {
  			$ix = 0;
@@ -887,22 +887,22 @@ sub patch_update_file {
  		for ($i = 0; $i < $ix; $i++) {
  			if (!defined $hunk[$i]{USE}) {
  				$prev = 1;
-				$other .= 'k';
+				$commands .= 'k';
  				last;
  			}
  		}
  		if ($ix) {
-			$other .= 'K';
+			$commands .= 'K';
  		}
  		for ($i = $ix + 1; $i < $num; $i++) {
  			if (!defined $hunk[$i]{USE}) {
  				$next = 1;
-				$other .= 'j';
+				$commands .= 'j';
  				last;
  			}
  		}
  		if ($ix < $num - 1) {
-			$other .= 'J';
+			$commands .= 'J';
  		}
  		for ($i = 0; $i < $num; $i++) {
  			if (!defined $hunk[$i]{USE}) {
@@ -913,14 +913,14 @@ sub patch_update_file {
  		last if (!$undecided);

  		if (hunk_splittable($hunk[$ix]{TEXT})) {
-			$other .= 's';
+			$commands .= 's';
  		}
-		$other .= 'e?';
+		$commands .= 'e?';
  		for (@{$hunk[$ix]{DISPLAY}}) {
  			print;
  		}
  		print colored $prompt_color, "Stage this hunk [" .
-			 join (",", split( '', $other)) . "]? ";
+			 join (",", split( '', $commands)) . "]? ";
  		my $line = <STDIN>;
  		if ($line) {
  			if ($line =~ /^y/i) {
@@ -947,15 +947,15 @@ sub patch_update_file {
  				}
  				next;
  			}
-			elsif ($other =~ /K/ && $line =~ /^K/) {
+			elsif ($commands =~ /K/ && $line =~ /^K/) {
  				$ix--;
  				next;
  			}
-			elsif ($other =~ /J/ && $line =~ /^J/) {
+			elsif ($commands =~ /J/ && $line =~ /^J/) {
  				$ix++;
  				next;
  			}
-			elsif ($other =~ /k/ && $line =~ /^k/) {
+			elsif ($commands =~ /k/ && $line =~ /^k/) {
  				while (1) {
  					$ix--;
  					last if (!$ix ||
@@ -963,7 +963,7 @@ sub patch_update_file {
  				}
  				next;
  			}
-			elsif ($other =~ /j/ && $line =~ /^j/) {
+			elsif ($commands =~ /j/ && $line =~ /^j/) {
  				while (1) {
  					$ix++;
  					last if ($ix >= $num ||
@@ -971,7 +971,7 @@ sub patch_update_file {
  				}
  				next;
  			}
-			elsif ($other =~ /s/ && $line =~ /^s/) {
+			elsif ($commands =~ /s/ && $line =~ /^s/) {
  				my @split = split_hunk($hunk[$ix]{TEXT}, $hunk[$ix]{DISPLAY});
  				if (1 < @split) {
  					print colored $header_color, "Split into ",
@@ -988,7 +988,7 @@ sub patch_update_file {
  				}
  			}
  			else {
-				help_patch_cmd($other);
+				help_patch_cmd($commands);
  				next;
  			}
  			# soft increment
-- 
1.6.0.4.782.geea74.dirty


-- 
William Pursell

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-28  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27 21:10 [PATCH 2/5] Name change: other -> commands William Pursell
2008-11-28  1:27 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).