[PATCH 3/6] Update git to v1.7.7.7
John Keeping
john at keeping.me.uk
Sat Mar 2 16:31:55 CET 2013
On Sat, Mar 02, 2013 at 10:19:32AM -0500, Jason A. Donenfeld wrote:
> On Sat, Mar 2, 2013 at 7:32 AM, John Keeping <john at keeping.me.uk> wrote:
> > This release changes the archive interface so that we now need to pass
> > argv into write_archive().
>
> It's a bit of a bummer having to do it this way -- I rather liked
> struct archiver_args. Such is life.
>
> > - args.time = commit->date;
>
> Do we loose something significant by not being able to provide the
> date like this, or do the new args take care of this automatically
> when parsing the hex?
The Git write_archive() method does exactly this, so nothing is lost
here.
> Also, can we axe the commit lookup code, now that that pointer isn't used?
>
> struct commit *commit;
> commit = lookup_commit_reference(sha1);
> if(!commit) {
> cgit_print_error(fmt("Not a commit reference: %s", hex));
> return 1;
> }
>
> Or are we unable to handle errors later on, and so it's best to
> validate here? At the very least, we don't need the commit pointer
> hanging around any longer.
If we pass something invalid into Git it will die() on us, so I left
this in so that we can provide a sensible error message.
You're right that we can get rid of the "commit" variable. Can you do
that as a fixup or would you like me to re-send?
John
More information about the CGit
mailing list