git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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).

Previous: Andy ParkinsNext: Benjamin Collins
Message 6 of 17 in “Re: cloning/pulling hooks”
  1. Andy ParkinsAug 29, 2007
  2. Petr BaudisAug 29, 2007
  3. Andy ParkinsAug 29, 2007
  4. Johannes SchindelinAug 29, 2007
  5. Andy ParkinsAug 29, 2007
  6. Alex RiesenAug 29, 2007
  7. Benjamin CollinsAug 29, 2007
  8. Petr BaudisAug 29, 2007
  9. Johannes SchindelinAug 29, 2007
  10. Petr BaudisAug 29, 2007
  11. Johannes SchindelinAug 29, 2007
  12. Petr BaudisAug 29, 2007
  13. Johannes SchindelinAug 29, 2007
  14. Petr BaudisAug 29, 2007
  15. Johannes SchindelinAug 29, 2007
  16. Alex RiesenAug 29, 2007
  17. Junio C HamanoAug 29, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.