Skip to contentSkip to conversation

git-clone --shared should imply --local

PATCH In review Pavel Roskin 2 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-clone --shared should imply --local

The "--shared" option to git-clone is silently ignored if "--local" is not specified. The manual doesn't mention such dependency. Make "--shared" imply "--local".

git-clone.sh +1 -1
index c09979a..699205e 100755
@@ -73,7 +73,7 @@ while
 	*,-n) no_checkout=yes ;;
 	*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
         *,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared) 
-          local_shared=yes ;;
+          local_shared=yes; use_local=yes ;;
 	*,-q|*,--quiet) quiet=-q ;;
 	1,-u|1,--upload-pack) usage ;;
 	*,-u|*,--upload-pack)
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 5 lines · Pavel Roskin

The "--shared" option to git-clone is silently ignored if "--local" is not specified. The manual doesn't mention such dependency. Make "--shared" imply "--local".

Hmph, then probably the manual should say it implies it...

#2 lore raw
Quoted 9 lines · Junio C Hamano
Quoted 5 lines · Pavel Roskin

The "--shared" option to git-clone is silently ignored if "--local" is not specified. The manual doesn't mention such dependency. Make "--shared" imply "--local".

Hmph, then probably the manual should say it implies it...

Actually, from the user point of view --local and --shared are alternatives to each other and to the default behavior. --local copies files, --shared makes a reference.

Saying that --shared implies --local could sound like git-clone would still copy all objects.

My description was from the implementation point of view.

Signature · 2 lines
Regards,
Pavel Roskin
#3 lore raw
Quoted 11 lines · Pavel Roskin
Quoted 9 lines · Junio C Hamano
Quoted 5 lines · Pavel Roskin

The "--shared" option to git-clone is silently ignored if "--local" is not specified. The manual doesn't mention such dependency. Make "--shared" imply "--local".

Hmph, then probably the manual should say it implies it...

Quoted 8 lines

Actually, from the user point of view --local and --shared are alternatives to each other and to the default behavior. --local copies files, --shared makes a reference.

Saying that --shared implies --local could sound like git-clone would still copy all objects.

My description was from the implementation point of view.

Ah. Makes sense.