git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regression: cannot edit after intent-to-add
@ 2020-11-03 17:16 Simon Richter
  2020-11-03 17:44 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Richter @ 2020-11-03 17:16 UTC (permalink / raw)
  To: git

Hi,

I often create intermediate commits using hunk editing, which used to work
in older versions even for new files, e.g.

    cat >file <<EOF
    foo
    bar
    EOF

    git add -N file

    git add -p file

git-add -p now shows me both lines as added, but does not allow me to edit.
If I want to create an intermediate commit adding just one of the lines, I
have to edit the actual file.

This used to work in older versions, as I remember using this technique for
a while and recommending it to others.

Before I do a deep-dive into a codebase I haven't looked at in years: can
this be re-added easily?

   Simon

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

* Re: Regression: cannot edit after intent-to-add
  2020-11-03 17:16 Regression: cannot edit after intent-to-add Simon Richter
@ 2020-11-03 17:44 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-11-03 17:44 UTC (permalink / raw)
  To: Simon Richter; +Cc: git

Simon Richter writes:

> git-add -p now shows me both lines as added, but does not allow me to edit.
> If I want to create an intermediate commit adding just one of the lines, I
> have to edit the actual file.
>
> This used to work in older versions, as I remember using this technique for
> a while and recommending it to others.
>
> Before I do a deep-dive into a codebase I haven't looked at in years: can
> this be re-added easily?

Which version of git are you using?  I think this was already fixed by
75a009dc29 (add -p: fix editing of intent-to-add paths, 2020-09-09),
which was included in v2.29.0.

https://lore.kernel.org/git/pull.731.git.1599659932391.gitgitgadget@gmail.com/

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

end of thread, other threads:[~2020-11-03 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 17:16 Regression: cannot edit after intent-to-add Simon Richter
2020-11-03 17:44 ` Kyle Meyer

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 NNTP newsgroup(s).