From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 4/4] replace: add a --raw mode for --edit
Date: Wed, 25 Jun 2014 06:24:54 -0400 [thread overview]
Message-ID: <20140625102454.GA5130@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPig+cRKxwJ64=qFAtefonutmZuURpTRZyjyjSaxcpuinRGL4g@mail.gmail.com>
On Tue, Jun 24, 2014 at 09:40:09PM -0400, Eric Sunshine wrote:
> On Tue, Jun 24, 2014 at 5:46 AM, Jeff King <peff@peff.net> wrote:
> > One of the purposes of "git replace --edit" is to help a
> > user repair objects which are malformed or corrupted.
> > Usually we pretty-print trees with "ls-tree", which is much
> > easier to work with than the raw binary data. However, some
> > forms of corruption break the tree-walker, in which case our
> > pretty-printing fails, rendering "--edit" useless for the
> > user.
> >
> > This patch introduces a "--raw" option, which lets you edit
> > the binary data in these instances.
>
> Is there a possibility that any of the other git-replace modes will
> grow a need for "raw"? If not, would it make sense to make this
> specific to "edit" as --edit=raw?
I doubt that any other modes will want it, as it is about the
pretty-printing step which is pretty specific to --edit. However, making
it "--edit=raw" also precludes adding other "modes" to --edit. I do
not have any in mind, but I do not see it as impossible.
Preclude is maybe a strong word. You could have "--edit=raw,flag1,flag2",
but then we are essentially reinventing an option parser inside --edit's
value. Not to mention that you cannot do "--no-raw", even without other
flags being added.
-Peff
next prev parent reply other threads:[~2014-06-25 10:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 9:42 [PATCH 0/4] git replace --edit --raw Jeff King
2014-06-24 9:43 ` [PATCH 1/4] replace: replace spaces with tabs in indentation Jeff King
2014-06-24 9:45 ` [PATCH 2/4] avoid double close of descriptors handed to run_command Jeff King
2014-06-24 9:46 ` [PATCH 3/4] replace: use argv_array in export_object Jeff King
2014-06-24 9:46 ` [PATCH 4/4] replace: add a --raw mode for --edit Jeff King
2014-06-25 1:40 ` Eric Sunshine
2014-06-25 10:24 ` Jeff King [this message]
2014-06-25 22:33 ` Junio C Hamano
2014-06-26 15:55 ` Jeff King
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140625102454.GA5130@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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.
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).