Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Add path-limiting to git-add--interactive

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:53

Wincent Colaiuta [off-list ref] writes:
quoted hunk
@@ -56,9 +56,14 @@ sub list_modified {
 	my ($only) = @_;
 	my (%data, @return);
 	my ($add, $del, $adddel, $file);
+	my @tracked = grep {
+		defined run_cmd_pipe(qw(git ls-files
+			                --exclude-standard --), $_)
+	} @ARGV;
+	return if $#tracked == -1 && $#ARGV != -1;
Eek.  why?

Did you mean to say:

    my @tracked = run_cmd_pipe(gw(git ls-files --exclude-standard --) @ARGV);

It would also make sense to use --error-unmatch and perhaps --with-tree=HEAD
like git-commit.sh does.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help