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

Re: Locking files / git

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Sep 17, 2013, 21:36 UTC
Message-ID
<20130917213619.GM28675@paksenarrion.iveqy.com>
In-Reply-To
<CACPGbcsB-ieZnS5maQgtnRTifFON9fEFpCGGdHtQ2ZjySdxDYA@mail.gmail.com>
On Tue, Sep 17, 2013 at 09:45:26PM +0200, Nicolas Adenis-Lamarre wrote:
Show 9 quoted lines
> Ooops. It seems that each time somebody says these two words together,
> people hate him, and he is scorned by friends and family.
> 
> For the moment, i want a first feedback, an intermediate between
> "locking is bad" and "ok", but i would prefer in the negativ answer
> something with arguments ("Take CVS as an example of what not to do;
> if in doubt, make the exact opposite decision." is one), and in the
> positiv answer, good remarks about problems with my implementation
> that could make it better.

So working with locks and text-files is generally stupid to do with git since you don't use git merging capabilities. Working with binary files in git is stupid because git doesn't handle them very well because they the deltas can't be calculated very good.

It seems to me that if you need to do locking one of the above scenarios is true for you and you should not use git at all.

However, there's always the case when you've a mixed project with both binary and text-files. In that case I believe Jeff gave an excellent answer.

But think twice, are you using git in a sane way? Even a small binary file will result in a huge git repo if it's updated often and the project has a long history.

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Previous: Jeff KingNext: Nicolas Adenis-Lamarre
Message 3 of 7 in “Locking files / git”
  1. Nicolas Adenis-LamarreSep 17, 2013
  2. Jeff KingSep 17, 2013
  3. Fredrik GustafssonSep 17, 2013
  4. Nicolas Adenis-LamarreSep 18, 2013
  5. Sitaram ChamartySep 18, 2013
  6. Thomas KochSep 18, 2013
  7. Sitaram ChamartySep 18, 2013

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.