git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Unable to use --patch with git add

From
Ayush Goel <ayushgoel111@gmail.com>
Date
Oct 11, 2017, 17:55 UTC
Message-ID
<CAEBs8jKAsb3B-6WJ=ptL2AsGvDRFVPYLCsztpdTN6KCBLOo1XA@mail.gmail.com>
In-Reply-To
<20171011174952.almye3qa2tmyrmol@LykOS.localdomain>
Hello Santiago,
Thank you for picking this up.
On Wed, Oct 11, 2017 at 11:19 PM, Santiago Torres <santiago@nyu.edu> wrote:
> It'd be helpful to know:
>
> - What did you do?

I have recently updated to git version 2.14.2. The problem started happening after that. Made changes to a file. Tried `git add -p`.

> - What did you expect to happen?
Enter the patch add mode of git.
> - What happened instead?

Usual git patch mode is that it shows a patch and expects user to add/skip/split etc. Instead it never stops to take input from me.

See this ->
git add -p
diff --git a/Tests/OSXTests/TDTStreamingTests.m
b/Tests/OSXTests/TDTStreamingTests.m
index 35757bc..525fe56 100644
--- a/Tests/OSXTests/TDTStreamingTests.m
+++ b/Tests/OSXTests/TDTStreamingTests.m
@@ -116,7 +116,7 @@ static NSTask *compressionServerTask;
 }

 - (void)breathe {
-  NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0.1];
+  NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0.01];
   [[NSRunLoop currentRunLoop] runUntilDate:date];
 }

#### Expecting git input mode to stop the process here #####
#### Instead git exits without any error #####

>
> I suspect you are using --patch with a new file, so you probably need to first
> add it with -N or so. This is just a shot in the dark though...
>

Not adding new file.

> Thanks,
> -Santiago.
>
> On Wed, Oct 11, 2017 at 11:16:39PM +0530, Ayush Goel wrote:
>> $ git --version
>> git version 2.14.2
>>
>> What more details can I provide to help debug this?
>>
>> --
>> Regards,
>> Ayush Goel
-- 
Regards,
Ayush Goel
Previous: Santiago TorresNext: Jeff King
Message 3 of 8 in “Unable to use --patch with git add”
  1. Ayush GoelOct 11, 2017
  2. Santiago TorresOct 11, 2017
  3. Ayush GoelOct 11, 2017
  4. Jeff KingOct 11, 2017
  5. Ayush GoelOct 11, 2017
  6. Jeff KingOct 11, 2017
  7. Jonathan NiederOct 12, 2017
  8. Kevin DaudtOct 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.