Code

describe: load refnames before calling describe()
[git.git] / git-add--interactive.perl
index 8f66b825dd8310fa2160bb08bf0c50acb9ff4156..69aeaf03ec65922d8a3e5e092fab3d4b6ffcb63e 100755 (executable)
@@ -259,7 +259,7 @@ sub list_modified {
                @tracked = map {
                        chomp $_;
                        unquote_path($_);
-               } run_cmd_pipe(qw(git ls-files --exclude-standard --), @ARGV);
+               } run_cmd_pipe(qw(git ls-files --), @ARGV);
                return if (!@tracked);
        }
 
@@ -933,6 +933,10 @@ sub coalesce_overlapping_hunks {
        my ($last_o_ctx, $last_was_dirty);
 
        for (grep { $_->{USE} } @in) {
+               if ($_->{TYPE} ne 'hunk') {
+                       push @out, $_;
+                       next;
+               }
                my $text = $_->{TEXT};
                my ($o_ofs) = parse_hunk_header($text->[0]);
                if (defined $last_o_ctx &&