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

Re: Locking binary files

From
Boaz Harrosh <bharrosh@panasas.com>
Date
Sep 23, 2008, 14:35 UTC
Message-ID
<48D8FEC5.3060503@panasas.com>
In-Reply-To
<94c1db200809230714k6b007919yfd8ad1b86cbcd385@mail.gmail.com>
Mario Pareja wrote:
Show 37 quoted lines
>> It should be easy for a company to set a policy where a couple of scripts
>> must be run for particular type of files. Given that, the implementation
>> of such scripts is easy:
>>
>> For every foo.bin there is possibly a foo.bin.lock file.
>>
>> Lock-script look for absence of the lock-file at upstream then git-add
>> the file (With some info that tells users things like who has the file).
>> If git-push fails, since I'm adding a file and someone already added
>> it while I was pushing, then the lock is not granted.
>>
>> Unlock-script will git-rm the lock-file and push.
>>
>> In both scripts mod-bits of original file can be toggled for
>> read-only/write signaling to the user. (At upstream the file is always
>> read-only)
>>
>> This can also work in a distributed system with more then one tier of
>> servers. (Locks pushed to the most upstream server)
>>
>> Combine that with git's mail notifications for commits and you have a
>> system far more robust then svn will ever want to be
>>
>> My $0.017
>> Boaz
>>
> 
> This is a reasonable approach to obtaining the desired functionality.
> Unfortunately, I have not seen any third-party packages implementing
> such a feature.  It seems to me the problem is general enough to be
> solved once rather than requiring organizations wishing to use git to
> implement an in-house locking system. It simply creates more friction.
> Perhaps, when I have the time, I will come up with something others
> can use.  For now, unfortunately, it seems I am out of luck?
> 
> Mario
> --

The open-source my friend. First comes first implements. More and more development platforms use XML files in where they used a binary file format before. Just for these cases. Git is mostly used with open-source and/or very new systems that don't have binary file formats. OK graphics is another thing, I guess.

So you are welcome to it. "git-lock" is available
Boaz
Previous: Mario ParejaNext: Dmitry Potapov
Message 6 of 19 in “Re: Locking binary files”
  1. Mario ParejaSep 23, 2008
  2. Andreas EricssonSep 23, 2008
  3. Boaz HarroshSep 23, 2008
  4. Boaz HarroshSep 23, 2008
  5. Mario ParejaSep 23, 2008
  6. Boaz HarroshSep 23, 2008
  7. Dmitry PotapovSep 23, 2008
  8. Andreas EricssonSep 23, 2008
  9. Mario ParejaSep 23, 2008
  10. Alex RiesenSep 23, 2008
  11. Daniel BarkalowSep 23, 2008
  12. Junio C HamanoSep 23, 2008
  13. Daniel BarkalowSep 23, 2008
  14. Dmitry PotapovSep 23, 2008
  15. Daniel BarkalowSep 23, 2008
  16. Dmitry PotapovSep 23, 2008
  17. Daniel BarkalowSep 24, 2008
  18. Dmitry PotapovSep 24, 2008
  19. Dmitry PotapovSep 23, 2008

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.