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

Re: Regression in patch add?

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
May 10, 2018, 13:54 UTC
Message-ID
<CAN0heSoNP6ZjoU4x=tjwXxN_4oeOdrPG2LuahTPvGz0Y9WPp3w@mail.gmail.com>
In-Reply-To
<20180510131626.17859-1-oliverjash@gmail.com>
On 10 May 2018 at 15:16, Oliver Joseph Ash <oliverjash@gmail.com> wrote:
> (Apologies, I accidentally sent this as a reply to the original post, instead of your email. I'm new to this!)
(No worries.) ;-)
>> does your test involve unusual file systems, funny characters in filenames, ..? You are on some sort of Linux, right?
>
> I'm running macOS 10.13.4. I don't have any unusual file system setup, as far as I'm aware. The filename in my test case is simply `foo`.
I'm not too familiar with Mac, unfortunately, but let's see..
Show 5 quoted lines
> I tried the steps you suggested: on git 2.17.0, saving the patch, editing it, and applying it, and it succeeded.
>
>> should now show bar2 in the first hunk and bar1 in the second hunk, just like your edited test.patch.
>
> That was the case, although I had to remove the `--check` flag from `git apply`.

Hmm, you mean that `git apply --check test.patch` failed? With error messages? Or, you had to remove the --check flag in order for the patch to actually be applied on disk? I would guess it's the latter, but just to be clear.

Show 5 quoted lines
>> How comfortable are you with building Git from the sources?
>
> I've never done it before, but I assume it's well documented, so I'm willing to give it a shot!
>
> Happy to try any steps to debug this! Although I'm a bit surprised no-one else can reproduce it with the same version of Git, which makes it seem less likely this could be a bug, and more likely it's something in my setup.

Where do the git 2.17.0 and 2.16.2 come from that you have been testing? Homebrew? Apple? (Ple

So you should be able to do `git clone https://github.com/git/git.git` and read INSTALL. It might be useful to start with `git checkout v2.17.0` to make sure you're testing roughly the same thing as before.

As for obtaining the dependencies, since I'm not familiar with Mac, I cannot give any good hints.

I see now that Phillip has replied with a good guess. Let's hope he has managed to circle in on what's causing your problem.

Martin
Previous: Oliver Joseph AshNext: Phillip Wood
Message 8 of 22 in “Regression in patch add?”
  1. mqudsi@neosmart.netApr 15, 2018
  2. Martin ÅgrenApr 15, 2018
  3. Phillip WoodApr 16, 2018
  4. Phillip WoodApr 16, 2018
  5. Oliver Joseph AshMay 10, 2018
  6. Martin ÅgrenMay 10, 2018
  7. Oliver Joseph AshMay 10, 2018
  8. Martin ÅgrenMay 10, 2018
  9. Phillip WoodMay 10, 2018
  10. Oliver Joseph AshMay 10, 2018
  11. Phillip WoodMay 10, 2018
  12. Junio C HamanoMay 11, 2018
  13. Phillip WoodMay 11, 2018
  14. Oliver Joseph AshMay 10, 2018
  15. add -p: fix counting empty context lines in edited patchesPhillip Wood, Jun 1, 2018
  16. Jacob KellerJun 1, 2018
  17. Eric SunshineJun 1, 2018
  18. Phillip WoodJun 4, 2018
  19. Eric SunshineJun 4, 2018
  20. add -p: fix counting empty context lines in edited patchesPhillip Wood, Jun 11, 2018
  21. Jeff FelchnerJul 11, 2018
  22. Junio C HamanoJul 11, 2018

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.