Revision 5f42ac921fe06bbb80df82d8fa5cb15701ec2f60 authored by J. Bruce Fields on 05 August 2007, 23:16:09 UTC, committed by J. Bruce Fields on 05 August 2007, 23:18:05 UTC
It was a neat trick to show that you could introduce the git-add manual
page without using the word "index", and it was certainly an improvement
over the previous man page (which started out "A simple wrapper for
git-update-index to add files to the index...").

But it's possible to use the standard terminology without sacrificing
user-friendliness.  So, rewrite to use the word "index" when
appropriate.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
1 parent 4e0b2bb
Raw File
test-match-trees.c
#include "cache.h"
#include "tree.h"

int main(int ac, char **av)
{
	unsigned char hash1[20], hash2[20], shifted[20];
	struct tree *one, *two;

	if (get_sha1(av[1], hash1))
		die("cannot parse %s as an object name", av[1]);
	if (get_sha1(av[2], hash2))
		die("cannot parse %s as an object name", av[2]);
	one = parse_tree_indirect(hash1);
	if (!one)
		die("not a treeish %s", av[1]);
	two = parse_tree_indirect(hash2);
	if (!two)
		die("not a treeish %s", av[2]);

	shift_tree(one->object.sha1, two->object.sha1, shifted, -1);
	printf("shifted: %s\n", sha1_to_hex(shifted));

	exit(0);
}
back to top