Re: [PATCH] git init: optionally allow a directory argument

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:
> Nanako Shiraishi <nanako3@xxxxxxxxxxx> writes:
>
>> When starting a new repository, I see my students often say
>>     % git init newrepo
>> and curse git.  They could say
>>     % mkdir newrepo; cd newrepo; git init
>> but allowing it as an obvious short-cut may be nicer.
>>
>> Signed-off-by: Nanako Shiraishi <nanako3@xxxxxxxxxxx>
>
> Hmm, I didn't realize this is so common a wish among new people.  The patch
> seems clean.  Anybody has comments, both on code and the use case?

It still surprises me that git doesn't do this, since it is at odds with
almost every other version control system I have on hand or experience with,
other than CVS; Subversion, svk, Bazaar and Mercurial all take a trailing
target argument.

CVS and monotone take an option to specify where; only darcs is like git and
uses the current directory as the target.

So, from where I sit it makes sense to have 'git init foo' create a 'foo'
directory and repository below the current location.

Regards,
        Daniel

...and, yeah, I still get caught every now and then when I create a new
repository by hand.
-- 
✣ Daniel Pittman            ✉ daniel@xxxxxxxxxxxx            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

--
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]