From: Johannes Sixt <j6t@kdbg.org>
To: Pratyush Yadav <me@yadavpratyush.com>
Cc: git@vger.kernel.org
Subject: Re: How to reset selected lines?
Date: Wed, 14 Aug 2019 00:07:26 +0200 [thread overview]
Message-ID: <1f31dd2c-3023-2d13-3466-bffabab703cc@kdbg.org> (raw)
In-Reply-To: <20190813141816.yoer6pfjdnlgtj76@localhost.localdomain>
Am 13.08.19 um 16:18 schrieb Pratyush Yadav:
> Now, I want to add a similar feature, but one that discards/resets the
> selected lines. And I'd like to avoid the hack that git-gui's
> apply_range_or_line is. So, is there a cleaner way to do this that does
> not involve generating a diff and then applying it?
Don't waste your time. I'm using this feature since years. It's
available in these three commits:
https://github.com/j6t/git/commit/55276690b2bc6a
https://github.com/j6t/git/commit/f12b294b68b595
https://github.com/j6t/git/commit/00860615691604
Thanks go to Bert Wesarg. The patches are also available in this thread:
https://public-inbox.org/git/cccd6193cf3bfe170e14270204d735a842bb8563.1326116492.git.bert.wesarg@googlemail.com/#t
-- Hannes
next prev parent reply other threads:[~2019-08-13 22:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 14:18 How to reset selected lines? Pratyush Yadav
2019-08-13 15:42 ` Jeff King
2019-08-13 17:32 ` Junio C Hamano
2019-08-14 11:48 ` Pratyush Yadav
2019-08-14 14:52 ` Jeff King
2019-08-13 22:07 ` Johannes Sixt [this message]
2019-08-14 11:11 ` Pratyush Yadav
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=1f31dd2c-3023-2d13-3466-bffabab703cc@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=me@yadavpratyush.com \
/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).