From: Daniel Jacobowitz <dan@debian.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Resurrect diff-tree-helper -R
Date: Sat, 30 Apr 2005 21:47:26 -0400 [thread overview]
Message-ID: <20050501014726.GA15220@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0504301805300.2296@ppc970.osdl.org>
On Sat, Apr 30, 2005 at 06:09:53PM -0700, Linus Torvalds wrote:
> So it would be much nicer (I think) if mode changes are handled
> separately, with a simple separate line before the diff saying
>
> "Mode change: %o->%o %s", oldmode, newmode, path
>
> and not mess up the diff header. That way, you only see it when it
> actually makes any difference, and it's more readable both for humans
> _and_ machines as a result.
>
> Normal "patch" will just ignore the extra lines before the diff anyway, so
> it won't matter there.
>
> Comments?
It sounds good - but could you efficiently collect them before any diff
output? If you have something like this, it'll be easy to read:
Mode change: 644->755 foo.sh
Mode change: 644->755 bar.sh
--- ChangeLog
+++ ChangeLog
@@ -1,0 +1,1 @@
+New line
--- copyright
+++ copyright
@@ -1,0 +1,1 @@
+New line
But if you generate this then you might as well not generate the mode
lines at all, for all a human looking at the diff is going to notice
them:
--- ChangeLog
+++ ChangeLog
@@ -1,0 +1,1 @@
+New line
Mode change: 644->755 foo.sh
--- copyright
+++ copyright
@@ -1,0 +1,1 @@
+New line
Mode change: 644->755 bar.sh
The latter is how diff does its "Only in" messages. I never see them
when I'm looking through a diff of any size; only via diffstat, where
they're clearly disambiguated.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-05-01 1:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-01 0:34 [PATCH] Resurrect diff-tree-helper -R Junio C Hamano
2005-05-01 1:09 ` Linus Torvalds
2005-05-01 1:47 ` Daniel Jacobowitz [this message]
2005-05-01 5:33 ` Linus Torvalds
2005-05-01 2:22 ` Junio C Hamano
2005-05-01 5:27 ` Linus Torvalds
2005-05-01 6:22 ` Junio C Hamano
2005-05-01 7:21 ` [PATCH] Add git-apply-patch-script Junio C Hamano
2005-05-01 7:19 ` [PATCH] Rework built-in diff to make its output more dense Junio C Hamano
2005-05-13 22:45 ` [PATCH] Resurrect diff-tree-helper -R Petr Baudis
2005-05-13 22:50 ` Junio C Hamano
2005-05-13 22:59 ` Junio C Hamano
2005-05-13 23:33 ` Petr Baudis
2005-05-13 23:59 ` Junio C Hamano
2005-05-14 0:33 ` Junio C Hamano
2005-05-14 15:03 ` Petr Baudis
2005-05-14 16:27 ` Junio C Hamano
2005-05-14 23:35 ` Petr Baudis
2005-05-15 6:25 ` Junio C Hamano
2005-05-15 9:30 ` Petr Baudis
2005-05-15 18:07 ` Junio C Hamano
2005-05-15 18:10 ` [PATCH] Tweak diff output further to make it a bit less distracting Junio C Hamano
2005-05-14 15:02 ` [PATCH] Resurrect diff-tree-helper -R Petr Baudis
2005-05-14 0:03 ` Junio C Hamano
2005-05-13 23:05 ` Junio C Hamano
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=20050501014726.GA15220@nevyn.them.org \
--to=dan@debian.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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.
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).