Git development
 help / color / mirror / Atom feed
* [PATCH 0/2] resurrect format-patch's patch id checking
@ 2006-06-25  1:50 Johannes Schindelin
  2006-06-26 15:33 ` [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery Johannes Schindelin
  0 siblings, 1 reply; 20+ messages in thread
From: Johannes Schindelin @ 2006-06-25  1:50 UTC (permalink / raw)
  To: git, junkio, martin


With these patches, you can say

	git format-patch --ignore-if-in-upstream upstream

to get a series of only the patches which are in HEAD, but not upstream.

The first patch adds diff_flush_patch_id() to calculate the patch id, after
a diff queue was set up. (Earlier, I sent out a version which also adds
a command line option to the diff family, but I'll postpone that until
Timo's patches went in).

The second patch adds the actual patch id checking. There are two tricky
things involved:

	- I add a pseudo-object for each patch of the upstream, which has
	  the patch id as sha1. This is no real object, but since we rely
	  on the hashes being unique for all practical purposes, and since
	  it has parsed == 0, it should be no problem.

	- To add the patch ids of the upstream, the revision walker must
	  be called twice.

	  So, if format-patch was called with a range "a..b" (a single
	  revision "a" is handled as "a..HEAD" by format-patch), a revision
	  walker is set up for "b..a", and the patch ids are calculated and
	  stored. This is done by toggling the UNINTERESTING bits of both
	  pending objects.

	  After that, the flags of all objects are reset to 0, so that the
	  revisions can be walked again. The flags of the two pending objects
	  are then reset to their original state.

Note that "--numbered" still works.

WARNING: since it is quite late in this part of the world, _and_ I am known
to produce not-always-optimal patches which could eat your children, please
give this a good beating.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2006-06-27 20:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-25  1:50 [PATCH 0/2] resurrect format-patch's patch id checking Johannes Schindelin
2006-06-26 15:33 ` [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery Johannes Schindelin
2006-06-26 16:09   ` Junio C Hamano
2006-06-26 22:44     ` Johannes Schindelin
2006-06-26 22:20   ` Martin Langhoff
2006-06-26 22:39     ` Johannes Schindelin
2006-06-26 22:50       ` Martin Langhoff
2006-06-26 23:00         ` Johannes Schindelin
2006-06-26 23:04           ` Junio C Hamano
2006-06-26 23:14             ` [PATCH] format-patch: support really old non-range syntax, with a warning Johannes Schindelin
2006-06-26 23:15           ` [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery Martin Langhoff (CatalystIT)
2006-06-26 23:21             ` Johannes Schindelin
2006-06-27  8:31             ` Johannes Schindelin
2006-06-27  9:52               ` Martin Langhoff
2006-06-27 10:54                 ` Johannes Schindelin
2006-06-27 11:09                   ` Martin Langhoff
2006-06-27 12:39                     ` Johannes Schindelin
2006-06-26 22:48     ` Junio C Hamano
2006-06-26 22:57       ` Johannes Schindelin
2006-06-27 20:38       ` [PATCH] " Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox