git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 16 of 17 in “Fall back to three-way merge when applying a patch.”
  1. Fall back to three-way merge when applying a patch.Junio C Hamano, Oct 5, 2005
  2. Linus TorvaldsOct 5, 2005
  3. Junio C HamanoOct 5, 2005
  4. Linus TorvaldsOct 5, 2005
  5. Junio C HamanoOct 6, 2005
  6. Eric W. BiedermanOct 6, 2005
  7. Linus TorvaldsOct 6, 2005
  8. Junio C HamanoOct 6, 2005
  9. Eric W. BiedermanOct 6, 2005
  10. Linus TorvaldsOct 6, 2005
  11. Eric W. BiedermanOct 6, 2005
  12. Linus TorvaldsOct 6, 2005
  13. Eric W. BiedermanOct 6, 2005
  14. Show original and resulting blob object info in diff output.Junio C Hamano, Oct 7, 2005
  15. Linus TorvaldsOct 7, 2005
  16. Junio C HamanoOct 7, 2005
  17. Junio C HamanoOct 6, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.