Re: [PATCH] Show original and resulting blob object info in diff output.

From: Junio C Hamano <junkio@cox.net>
Date: 2005-10-07 15:16:14
Linus Torvalds <torvalds@osdl.org> writes:

> 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.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Oct 07 15:16:23 2005

This archive was generated by hypermail 2.1.8 : 2005-10-07 15:16:56 EST