Skip to content

Make git add -i work #2

Description

@dmik

Currently it fails with:

Cannot close git rev-parse --git-dir (No children) at D:/Coding/git/master-run/libexec/git-core/git-add--interactive line 187.

This is new (brought by 2.30.2) and appears to be due to this change in git-add--interactive.perl:
image

Apparently, closing a pipe fails with error on OS/2.

Also, even if I work around this, it fails earlier when staging individual chunks like this:

(1/1) Stage this hunk [y,n,q,a,d,e,?]? y
error: patch failed: test.txt:1
                               error: test.txt: patch does not apply
                                                                    diff --git a/test.txt b/test.txt
index 8a66d40..4122eca 100644
--- a/test.txt
+++ b/test.txt
@@ -1 +1,3 @@
-wef
\ No newline at end of file
+wef
+this line to add now
+this line to add later

Perhaps, some CRLF issue as usual (both when applying patches and when outputting messages to the console).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions