git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Unable to use --patch with git add
@ 2017-10-11 17:46 Ayush Goel
  2017-10-11 17:49 ` Santiago Torres
  2017-10-11 18:49 ` Kevin Daudt
  0 siblings, 2 replies; 8+ messages in thread
From: Ayush Goel @ 2017-10-11 17:46 UTC (permalink / raw)
  To: git

$ git --version
git version 2.14.2

What more details can I provide to help debug this?

-- 
Regards,
Ayush Goel

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

* Re: Unable to use --patch with git add
  2017-10-11 17:46 Unable to use --patch with git add Ayush Goel
@ 2017-10-11 17:49 ` Santiago Torres
  2017-10-11 17:55   ` Ayush Goel
  2017-10-11 18:49 ` Kevin Daudt
  1 sibling, 1 reply; 8+ messages in thread
From: Santiago Torres @ 2017-10-11 17:49 UTC (permalink / raw)
  To: Ayush Goel; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

It'd be helpful to know:

- What did you do?
- What did you expect to happen?
- What happened instead?

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...

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Unable to use --patch with git add
  2017-10-11 17:49 ` Santiago Torres
@ 2017-10-11 17:55   ` Ayush Goel
  2017-10-11 18:00     ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Ayush Goel @ 2017-10-11 17:55 UTC (permalink / raw)
  To: Santiago Torres; +Cc: git

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

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

* Re: Unable to use --patch with git add
  2017-10-11 17:55   ` Ayush Goel
@ 2017-10-11 18:00     ` Jeff King
  2017-10-11 18:13       ` Ayush Goel
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2017-10-11 18:00 UTC (permalink / raw)
  To: Ayush Goel; +Cc: Santiago Torres, git

On Wed, Oct 11, 2017 at 11:25:52PM +0530, Ayush Goel wrote:

> 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`.

This is a known issue in v2.14.2 with having "color.ui" set to "always"
in your config.

There's a fix in v2.15.0-rc1. You can either upgrade to that, or as a
workaround set "color.ui" to "auto" (or remove it completely from your
config, as "auto" is the default).

-Peff

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

* Re: Unable to use --patch with git add
  2017-10-11 18:00     ` Jeff King
@ 2017-10-11 18:13       ` Ayush Goel
  2017-10-11 18:27         ` Jeff King
  2017-10-12  3:05         ` Jonathan Nieder
  0 siblings, 2 replies; 8+ messages in thread
From: Ayush Goel @ 2017-10-11 18:13 UTC (permalink / raw)
  To: Jeff King; +Cc: Santiago Torres, git

Hey Jeff,

Thank you for your mail. It works :)

For future reference, is there a page for known issues of git?

On Wed, Oct 11, 2017 at 11:30 PM, Jeff King <peff@peff.net> wrote:
> On Wed, Oct 11, 2017 at 11:25:52PM +0530, Ayush Goel wrote:
>
>> 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`.
>
> This is a known issue in v2.14.2 with having "color.ui" set to "always"
> in your config.
>
> There's a fix in v2.15.0-rc1. You can either upgrade to that, or as a
> workaround set "color.ui" to "auto" (or remove it completely from your
> config, as "auto" is the default).
>
> -Peff



-- 
Regards,
Ayush Goel

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

* Re: Unable to use --patch with git add
  2017-10-11 18:13       ` Ayush Goel
@ 2017-10-11 18:27         ` Jeff King
  2017-10-12  3:05         ` Jonathan Nieder
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff King @ 2017-10-11 18:27 UTC (permalink / raw)
  To: Ayush Goel; +Cc: Santiago Torres, git

On Wed, Oct 11, 2017 at 11:43:46PM +0530, Ayush Goel wrote:

> Thank you for your mail. It works :)
> 
> For future reference, is there a page for known issues of git?

No, there's just the mailing list archive. But you can search it. E.g.:

  https://public-inbox.org/git/?q=%22add+-p%22

finds the relevant threads.

-Peff

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

* Re: Unable to use --patch with git add
  2017-10-11 17:46 Unable to use --patch with git add Ayush Goel
  2017-10-11 17:49 ` Santiago Torres
@ 2017-10-11 18:49 ` Kevin Daudt
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Daudt @ 2017-10-11 18:49 UTC (permalink / raw)
  To: Ayush Goel; +Cc: git

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?
> 

Hello Ayush,

Run:

  git config --global color.ui auto
  git config --unset --local color.ui #in case it's set locally

This is a known 'breakage' because people have set color.ui to always
(which should not be used anyway).

Kind regards, Kevin

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

* Re: Unable to use --patch with git add
  2017-10-11 18:13       ` Ayush Goel
  2017-10-11 18:27         ` Jeff King
@ 2017-10-12  3:05         ` Jonathan Nieder
  1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Nieder @ 2017-10-12  3:05 UTC (permalink / raw)
  To: Ayush Goel; +Cc: Jeff King, Santiago Torres, git

Hi Ayush,

Ayush Goel wrote:

> Thank you for your mail. It works :)
>
> For future reference, is there a page for known issues of git?

We usually try not to have known issues that would require such a
warning for long.  And when we fail, reminders like yours are very
welcome, though a search through the mailing list archive for an
existing thread to reply to instead of starting a new one is always
welcome.

Sorry for the trouble.

Sincerely,
Jonathan

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

end of thread, other threads:[~2017-10-12  3:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 17:46 Unable to use --patch with git add Ayush Goel
2017-10-11 17:49 ` Santiago Torres
2017-10-11 17:55   ` Ayush Goel
2017-10-11 18:00     ` Jeff King
2017-10-11 18:13       ` Ayush Goel
2017-10-11 18:27         ` Jeff King
2017-10-12  3:05         ` Jonathan Nieder
2017-10-11 18:49 ` Kevin Daudt

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).