Re: [PATCH 5/5] builtin-prune: protect objects listed on the command line
On Thursday 27 March 2008, Johannes Schindelin wrote:
Show 19 quoted lines
> On Thu, 27 Mar 2008, Junio C Hamano wrote:
>
> > Junio C Hamano <junio@pobox.com> writes:
> >
> > > From: Junio C Hamano <gitster@pobox.com>
> > > Date: Mon, 24 Mar 2008 23:20:51 -0700
> > >
> > > Finally, this resurrects the documented behaviour to protect other
> > > objects listed on the command line from getting pruned.
> > >
> > > Signed-off-by: Junio C Hamano <gitster@pobox.com> ---
> > > * This is done deliberately differently from what you did. Because
> > > we do not want to accept "we allow losing what's reachable from
> > > master" with "git prune master..next", setup_revisions() is not the
> > > right thing to use for this command.
> >
> > Ping?
>
> I did not see any problem with your implementation
Me neither, but, as a nitpick, wouldn't something like
if (!get_sha1(name, sha1)) {
object = parse_object(sha1);
if (!object)
die("bad object %s", name);
} else
die("unrecognized argument: %s", name);be a bit more useful?