Re: [PATCH 3/5] make "git unpack-file" a built-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 22 Jan 2010, Junio C Hamano wrote:
> >  {
> >  	unsigned char sha1[20];
> >  
> > -	git_extract_argv0_path(argv[0]);
> > -
> >  	if (argc != 2 || !strcmp(argv[1], "-h"))
> >  		usage("git unpack-file <sha1>");
> >  	if (get_sha1(argv[1], sha1))
> >  		die("Not a valid object name %s", argv[1]);
> >  
> > -	setup_git_directory();
> 
> This will now require "git unpack-file -h" to be run in a git controlled
> directory, so strictly speaking it changes behaviour.
> 
> Not that anybody would care that much, though.

Heh. You didn't notice the same change in the merge-tree conversion that 
you already accepted ;)

Yeah, any usage messages will now run after setup for the commands that do 
the whole RUN_SETUP thing. That's pack-redundant, unpack-file, mktag, 
merge-index and merge-tree. So they'll now report "Not a git repository" 
before they report invalid arguments.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]