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

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

From: Alex Scarborough <hidden>
Date: 2016-06-15 22:47:06

On Jul 24, 2009, at 4:36 PM, Junio C Hamano wrote:
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?
The use case makes sense.  This helps make git init be a bit more consistent
with git clone, which can take a trailing target.

For the code, I would replace the direct use of mkdir with safe_create_dir.
Otherwise it looks fine.

-Alex Scarborough
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help