Revision 6631c73685bea3c6300938f4900db0d0c6bee457 authored by Linus Torvalds on 01 July 2006, 03:21:59 UTC, committed by Junio C Hamano on 02 July 2006, 01:21:03 UTC
With history simplification, we still show merges that are required
to make the history _complete_, i.e. say that you had:

	  a
	  |
	  b
	 / \
	c   d
	|   |

and neither "a" nor "b" actually changed the file, but both "c" and "d"
did: in this case we have to leave "b" around just because otherwise there
would be no way to show the _relationship_, even if "b" itself doesn't
actually change the tree in any way what-so-ever.

It would make sense to make that further simplification if the
"--parents" flag wasn't present.  In that case the user is
literally asking for a list of commits and is not interested in
the relationship between them.

This patch also fixes a real bug.  Without this patch, the
"--parents --full-history" combination (which you'd get if you
do something like

	gitk --full-history Makefile

or similar) will actually _drop_ merges where all children are identical.
That's wrong in the --full-history case, because it means that the graph
ends up missing lots of entries.

In the process, this also should make

	git-rev-list --full-history Makefile

give just the _true_ list of all commits that changed Makefile (and
properly ignore merges that were identical in one parent), because now
we're not asking for "--parent", so we don't need the unnecessary merge
commits to keep the history together.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent ac3bc6c
Raw File
tag.h
#ifndef TAG_H
#define TAG_H

#include "object.h"

extern const char *tag_type;

struct tag {
	struct object object;
	struct object *tagged;
	char *tag;
	char *signature; /* not actually implemented */
};

extern struct tag *lookup_tag(const unsigned char *sha1);
extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size);
extern int parse_tag(struct tag *item);
extern struct object *deref_tag(struct object *, const char *, int);

#endif /* TAG_H */
back to top