Re: [PATCH] Show original and resulting blob object info in diff output.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 7, 2005, 05:16 UTC
- Message-ID
- <7vpsqh29gh.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0510062139560.31407@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 5 quoted lines
> IOW, why not make it shorter ans prettier and just make it be > > index 7be50413538868412a87..83660822fcbb9edac523 > > which is basically the first 20 hex digits of each SHA1.
Makes sense.
> If you want the "applies-to" etc,...
applies-to: is for the whole tree, and I think it can go if we do this per-blob signature thing.
The first SHA1 after applies-to: is coming from diff-tree, noting the commit object _after_ the change. I could filter it while running format-patch, because it is useless from patch application point of view.
> .... In fact, I bet 20 bits would be plenty).
So the updated proposal would be:
diff --git a/apply.c b/apply.c
index 7be5041..8366082 100644
--- a/apply.c
+++ b/apply.c
@@ -14,6 +14,7 @@
...
diff --git a/foo.sh b/bar.sh
old mode 100644
new mode 100755
index 7be5041..8366082
similarity index 86%
rename from foo.sh
rename to bar.sh
--- a/foo.sh
+++ b/bar.sh
@@ -14,6 +14,7 @@
...where the "index" line shows abbreviated SHA1 for pre- and post- image blob, with an optional mode bit string only if there is no mode change; otherwise we would have old/new mode line anyway.