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

Re: [PATCH] post-update hook: update working copy

From
Steven Grimm <koreth@midwinter.com>
Date
Nov 2, 2007, 17:28 UTC
Message-ID
<472B5E34.60709@midwinter.com>
In-Reply-To
<472AFD39.6000006@op5.se>
Andreas Ericsson wrote:
Show 10 quoted lines
>>  - Who guarantees that a human user is not actively editing the
>>    work tree files without saving?
> There are times when one simply doesn't care.
>
> I realize that for my situation, a much simpler script can (and is) 
> used, so
> I agree with your concerns. The idea that every git repo has a human 
> hacking
> on it isn't true though, so doing things like this are sometimes useful,
> timesaving and a real help.

Yeah, that's absolutely true. My use cases would be twofold. First, a public reference tree on a shared development server where people can look over my corner of the code base without having to check the whole thing out for themselves.

Second, a Web server with a bunch of static text/image files and PHP scripts. If I can deploy by just pushing to a "current release" branch, that saves me from having to first push then ssh to the machine and do "git reset --hard".

Neither one of those things is impossible to do with vanilla git. They just require extra busywork steps at the moment if you don't use an "update the working copy on push" hook.

-Steve
Previous: Andreas Ericsson
Message 6 of 6 in “post-update hook: update working copy”
  1. post-update hook: update working copySam Vilain, Nov 2, 2007
  2. Junio C HamanoNov 2, 2007
  3. Sam VilainNov 2, 2007
  4. Junio C HamanoNov 2, 2007
  5. Andreas EricssonNov 2, 2007
  6. Steven GrimmNov 2, 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.