Re: [PATCH] Resurrect diff-tree-helper -R
- From
- Daniel Jacobowitz <dan@debian.org>
- Date
- May 1, 2005, 01:47 UTC
- Message-ID
- <20050501014726.GA15220@nevyn.them.org>
- 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:
Show 13 quoted lines
> 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