Thread (3 messages) 3 messages, 3 authors, 2016-06-15

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

From: Daniel Pittman <hidden>
Date: 2016-06-15 22:47:06

Junio C Hamano [off-list ref] writes:
Nanako Shiraishi [off-list ref] writes:
quoted
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 <redacted>
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@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help