git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Daniel Dinnyes <dinnyesd@gmail.com>
To: git@vger.kernel.org
Subject: Issue with staging, unstaging, discarding hunks with no context
Date: Sun, 18 Oct 2020 06:48:17 +0100	[thread overview]
Message-ID: <CAFfHKJ54smgBZrYTEmgoqmo7gMp+H8AxjL3GxnWVdF9K_MnoFg@mail.gmail.com> (raw)
In-Reply-To: <CAFfHKJ7kAJ7030GPywKHEWG0vJjC0hhEGt4MMR=85nSHnu5Q-w@mail.gmail.com>

The problem I have is described in more detail in the issue here with magit:
https://github.com/magit/magit/issues/4222

The conclusion there was that this is an upstream problem due to some
recent changes in git.

As it has been mentioned in the issue itself, it is understood that
git had problems with handling hunks without context, so I assume this
upstream change was to eliminate such issues.

Yet my experience was that hunks without context worked fine before
80% of the time, except if they were right next to each other, they
might get mixed/messed up. Even in that case, I found that if I
staged/unstaged hunks in top-down order in magit it didn't cause
problems.

Without handling no-context hunks, I see I will have to stash/redo
entire change-sets, to be able to commit logically separate hunks
separately. This would be a major PITA.

Is there a plan to reintroduce handling of hunks with 0 line context
in the future, or is this something which is technically not going to
be possible ever?

Cheers,
Dan

       reply	other threads:[~2020-10-18  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFfHKJ7kAJ7030GPywKHEWG0vJjC0hhEGt4MMR=85nSHnu5Q-w@mail.gmail.com>
2020-10-18  5:48 ` Daniel Dinnyes [this message]
2020-10-18  9:12   ` Issue with staging, unstaging, discarding hunks with no context Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFfHKJ54smgBZrYTEmgoqmo7gMp+H8AxjL3GxnWVdF9K_MnoFg@mail.gmail.com \
    --to=dinnyesd@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).