Open sun opened 9 years ago
Interesting idea. I wouldn't be opposed to this, just have a few questions:
interdiff
to work? It sounds like it's just a diff between two existing files.Why not incorporate this functionality into the d.o infrastructure? Then I could see these automagic interdiffs on my phone, too.
Agreed, I think that would be the ultimate goal for sure. Until then though I can kind of see why @sun would want this though in the interim, even if just prototyping for d.o.
For sure, it just had to be said :) carry on.
Lacking proper support/usage of branches/patch-serials, other Drupal core contributors/reviewers become more and more mad of asking everyone for interdiffs - even for the most silly patches.
Objective
→ Instead of manually creating interdiffs, generate them automatically.
Dreditor needs to expose links, but that's a different topic.
Requirements
interdiff
are re-implemented differently:interdiff
binary (GNU diffutils)diff
binary (fallback)API
Synopsis:
Parameters:
old
: URI to first diff file.new
: URI to second diff file.timestamp
: Optional git repository checkout date (typically post date ofnew
). If omitted, checkout defaults to now/latest HEAD.Logic:
HEAD@{"$timestamp"}
curl $old > old.patch
curl $new > new.patch
interdiff old.patch new.patch
&& pass-through output (as-is)diff -up0 old.patch new.patch
(diff of diffs)Creating this issue "ahead of time". Didn't study yet whether it would be feasible to re-implement
interdiff
in pure JS. (Theoretically not much harder than "formatting" a diff, but not verified.)