Re: [PATCH] Make "git reset" a builtin. (incomplete)
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Aug 22, 2007, 16:20 UTC
- Message-ID
- <20070822162030.GB3528@steel.home>
- In-Reply-To
- <46CC3090.7080500@gmail.com>
Carlos Rica, Wed, Aug 22, 2007 14:48:16 +0200:
> This is the first version of the program "builtin-reset.c", > intended for replacing the script "git-reset.sh".
Very nice code :)
> + obj = deref_tag(parse_object(sha1), sha1_to_hex(sha1), 40);
> + if (!obj)
> + die("Could not parse object '%s'.", rev);
> + memcpy(sha1, obj->sha1, sizeof(sha1));You might consider using hashcpy