From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Mart Sõmermaa" <mrts.pydev@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Jeff King <peff@peff.net>
Subject: Re: git diff: add option for omitting the contents of deletes
Date: Mon, 28 Feb 2011 17:10:06 +0100 [thread overview]
Message-ID: <4D6BC8DE.1090402@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTim-vyWhgmFuewbd5e5iJiTC-EHz7g=efr2Sz-RH@mail.gmail.com>
Mart Sõmermaa venit, vidit, dixit 28.02.2011 11:45:
> Why not just make it reversible then?
>
> $ git diff -M
> diff --git a/foo b/bar
> similarity index 100%
> rename from foo
> rename to bar
>
> is nonreversible without git already (i.e. does not work with plain
> patch AFAIK).
That "i.e." is a misunderstanding:
I'm sure Junio meant that "git apply -R" should make sense on a path
like that.
You can easily undo (reverse) a rename without knowing the file
contents; undeleting a file is more difficult :)
> Adding
>
> $ git diff -D
> diff --git a/foo b/foo
> deleted file mode 100644
> delete foo
>
> would be neither less nor more reversible -- it would also only work
> with git apply
> (assuming that apply is amended accordingly).
To reverse it, we would need the sah1 lines, and the repo would need
that blob.
> Cognitive burdens aside, the "delete foo" output is both
> more explicit and shorter anyway. Occam's razor FTW :)!
Yes.
> Junio, I won't push this further, so it's a final call -- if you give -1,
> then let -D fall to the colourless abyss of oblivion :), if +1 or +0,
> I'll see if I can come up with a patch.
You can always submit a patch, and you can never know what happens ;)
> Best regards,
> MS
Uhm, and please don't do that top post thing and the cc culling.
Readding J&J.
[quote snipped]
prev parent reply other threads:[~2011-02-28 16:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-26 13:16 git diff: add option for omitting the contents of deletes Mart Sõmermaa
2011-02-26 20:11 ` Junio C Hamano
2011-02-27 14:41 ` Michael J Gruber
2011-02-27 22:33 ` Mart Sõmermaa
2011-02-28 9:58 ` Michael J Gruber
2011-02-28 10:51 ` Mart Sõmermaa
2011-02-27 22:54 ` Junio C Hamano
2011-02-27 23:07 ` Junio C Hamano
2011-02-28 7:31 ` Michael J Gruber
2011-02-28 12:17 ` Jeff King
2011-02-28 12:23 ` Jeff King
2011-02-28 12:32 ` Michael J Gruber
2011-02-28 12:59 ` Jeff King
2011-02-28 13:05 ` Michael J Gruber
2011-02-28 21:54 ` Jeff King
2011-02-28 18:11 ` Junio C Hamano
2011-02-28 22:23 ` Jeff King
2011-02-28 23:28 ` Junio C Hamano
2011-03-01 0:11 ` Junio C Hamano
2011-03-07 20:38 ` Mart Sõmermaa
2011-03-08 7:14 ` Michael J Gruber
2011-03-08 19:49 ` Junio C Hamano
2011-03-08 21:25 ` Mart Sõmermaa
2011-03-08 21:31 ` Jeff King
2011-02-28 12:42 ` symling diff driver (Was: Re: git diff: add option for omitting the contents of deletes) Michael J Gruber
2011-02-28 13:08 ` Jeff King
2011-02-28 15:26 ` [PATCH/WIP] attr: make attributes depend on file type Michael J Gruber
2011-02-28 17:30 ` Jeff King
2011-02-28 17:48 ` Junio C Hamano
2011-03-01 7:46 ` Michael J Gruber
2011-02-28 10:45 ` git diff: add option for omitting the contents of deletes Mart Sõmermaa
2011-02-28 16:10 ` Michael J Gruber [this message]
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=4D6BC8DE.1090402@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mrts.pydev@gmail.com \
--cc=peff@peff.net \
/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).