Re: cloning/pulling hooks
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Aug 29, 2007, 20:27 UTC
- Message-ID
- <20070829202726.GC11824@steel.home>
- In-Reply-To
- <200708291356.33126.andyparkins@gmail.com>
Andy Parkins, Wed, Aug 29, 2007 14:56:32 +0200:
Show 21 quoted lines
> On Wednesday 2007 August 29, Petr Baudis wrote: > > > But overally, I'm still not convinced that there is a feasible use-case > > for the cloned hooks at all. Someone has a particular example? > > Hits me all the time. > > 1) Start a new project > 2) Install a pre-commit hook that checks that every patch meets some > arbitrary coding standard > 3) Clone to laptop > 4) Kick self the first time you make a commit that doesn't adhere to coding > standards that would have been enforced by the hook script. > > The problem is that my brain thinks that cloning gets me the same > configuration as the source, but obviously it doesn't and I forget that I > need to clone _then_ scp .git/config and .git/hooks/*. > > I understand that these things are a security risk to do automatically, and I > don't think I'd advocate that. However, it would be useful to be able to > grab those files as well.
It is just a case for "git clone --clone-templates" (which does not exist yet), not for a clone hook.
Sometimes, I miss the cloning of .git/description, it probably should be something like: "git clone --clone=templates,config,description". Where config could include a predefined set of harmless config options (like colors or i18n).