login
Header Space

 
 

Re: [PATCH] GIT commit statistics.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Martin Langhoff <martin.langhoff@...>
Cc: <git@...>
Date: Monday, November 14, 2005 - 2:06 am

Martin Langhoff <martin.langhoff@gmail.com> writes:


It shouldn't be too tricky to enhance "git am" (git-apply called
at around line 49 in it) to grok binary differences for this
purpose, because you would have both pre- and post-image blob in
your object database, because the patch is being used only to
replay what you have in your reository, and it records their
abbreviated SHA1 name.

I've never felt need to "merge" the binary files myself and had
never got around doing this, but if you are interested, it would
go something like this:

. Make "index %.7s..%.7s" that abbreviates pre- and post- image
  blob SHA1s in diff.c configurable to spit out full 40 bytes.
  Call that option --full-index-sha1.

. The updated "git rebase" that uses the "format-patch | am" I
  outlined would pass the --full-index-sha1 to format-patch
  (which is pased onto underlying diff-tree -p).

. In apply.c, check if all of the following holds:

    * we have both the full 40-byte old_sha1_prefix[] and
      new_sha1_prefix[]; and

    * what the index records matches old_sha1_prefix[]; and

    * the new blob is found in the object database;

  and for such a path:

    * change parse_chunk() not to barf even on a binary patch.

    * change apply_data() to just declare the patch application
      result is the new blob recorded in the patch.

Hmm.

-
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Comments on recursive merge.., Linus Torvalds, (Mon Nov 7, 12:48 pm)
Re: Comments on recursive merge.., Fredrik Kuivinen, (Mon Nov 7, 6:58 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Mon Nov 7, 8:13 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Mon Nov 7, 8:33 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Fri Nov 11, 6:25 pm)
Re: Comments on recursive merge.., Ryan Anderson, (Sat Nov 12, 2:35 am)
[PATCH] GIT commit statistics., Junio C Hamano, (Sat Nov 12, 3:44 am)
Re: [PATCH] GIT commit statistics., Martin Langhoff, (Sat Nov 12, 8:19 am)
Re: [PATCH] GIT commit statistics., Petr Baudis, (Sun Nov 13, 7:11 am)
Re: [PATCH] GIT commit statistics., Junio C Hamano, (Sun Nov 13, 6:59 am)
Re: [PATCH] GIT commit statistics., Martin Langhoff, (Sun Nov 13, 4:42 pm)
Re: [PATCH] GIT commit statistics., Junio C Hamano, (Sun Nov 13, 11:33 pm)
Re: [PATCH] GIT commit statistics., Martin Langhoff, (Mon Nov 14, 12:01 am)
Re: [PATCH] GIT commit statistics., Junio C Hamano, (Mon Nov 14, 2:06 am)
Re: [PATCH] GIT commit statistics., Martin Langhoff, (Mon Nov 14, 4:51 am)
Re: [PATCH] GIT commit statistics., Junio C Hamano, (Mon Nov 14, 11:00 pm)
Re: [PATCH] GIT commit statistics., Junio C Hamano, (Mon Nov 14, 5:27 am)
Re: [PATCH] GIT commit statistics., Petr Baudis, (Mon Nov 14, 5:25 am)
Re: [PATCH] GIT commit statistics., Martin Langhoff, (Mon Nov 14, 5:25 pm)
Re: [PATCH] GIT commit statistics., Johannes Schindelin, (Sat Nov 12, 3:04 pm)
Re: [PATCH] GIT commit statistics., Petr Baudis, (Sat Nov 12, 8:53 am)
Re: [PATCH] GIT commit statistics., Catalin Marinas, (Tue Nov 15, 6:04 am)
Re: [PATCH] GIT commit statistics., Chuck Lever, (Tue Nov 15, 11:29 am)
Re: Comments on recursive merge.., Linus Torvalds, (Fri Nov 11, 6:53 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Fri Nov 11, 8:42 pm)
Re: Comments on recursive merge.., Johannes Schindelin, (Tue Nov 8, 7:58 am)
Re: Comments on recursive merge.., Fredrik Kuivinen, (Tue Nov 8, 5:02 pm)
Re: Comments on recursive merge.., Johannes Schindelin, (Tue Nov 8, 7:04 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Tue Nov 8, 5:52 pm)
Re: Comments on recursive merge.., Fredrik Kuivinen, (Tue Nov 8, 6:36 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Tue Nov 8, 7:05 pm)
Re: Comments on recursive merge.., Petr Baudis, (Tue Nov 8, 8:32 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Tue Nov 8, 8:51 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Tue Nov 8, 8:59 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Tue Nov 8, 9:22 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Tue Nov 8, 9:42 pm)
Re: Comments on recursive merge.., Johannes Schindelin, (Tue Nov 8, 7:18 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Tue Nov 8, 8:18 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Wed Nov 9, 2:10 am)
Re: Comments on recursive merge.., Junio C Hamano, (Tue Nov 8, 5:47 pm)
Re: Comments on recursive merge.., Junio C Hamano, (Mon Nov 7, 8:59 pm)
Re: Comments on recursive merge.., Linus Torvalds, (Mon Nov 7, 12:56 pm)
[PATCH] merge-recursive: Only print relevant rename messages, Fredrik Kuivinen, (Mon Nov 7, 7:19 pm)
speck-geostationary