From: <hackerp@suddenlink.net>
To: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Cc: kostix+git@007spb.ru, sitaramc@gmail.com
Subject: Re: git lock files (Was: GIT for Microsoft Access projects)
Date: Tue, 9 Jun 2015 13:21:44 -0500 [thread overview]
Message-ID: <20150609132144.ANWJW.73271.root@txifep04> (raw)
In-Reply-To: <1433870383-7631-1-git-send-email-sbeller@google.com>
Thanks folks, I am digesting all you have said.
Now the command line I can do (I'm a programmer) but the secretary here I doubt.
So is there at GUI interface for this? Does it work on Windows systems?
Thanks,
Paul
---- Stefan Beller <sbeller@google.com> wrote:
> Just because Git allows distributed workflows, doesn't mean we
> should only focus on being distributed IMHO.
>
> The question for content not being mergable easily pops up all
> the time. (Game/Graphics designers, documents, all this binary
> stuff, where there is no good merge driver).
>
> I could imagine a "git lock" command which looks like this:
>
> git config lock.centralServer origin
> git config lock.defaultBranch master
>
> git lock add [branch] [--] <path/to/file>
> git lock remove [branch] [--] <path/to/file>
> git lock ls [<branch>]
>
> And the way this is implemented is roughly (unoptimized, just showing
> how you would achieve this with todays command set):
>
> git fetch --depth=1 $(git config --get lock.centralServer) refs/locks/$(git config --get lock.defaultBranch)
> git checkout refs/locks/$(git config --get lock.centralServer)/$(git config --get lock.defaultBranch)
> switch(option) {
> case add:
> if exist <path/to/file>
> return -1
> else
> echo $(git config --get user.name) $(date) > <path/to/file>
> git add <path/to/file> && git commit "add new lock"
> fi
> case remove:
> if exist <path/to/file>
> # todo: check if the same user locked it before
> rm <path/to/file>
> else
> return -1
> fi
> case ls:
> ls -R .
> }
> git push $(git config --get lock.centralServer) refs/locks/$(git config --get lock.defaultBranch)
> git <restore working tree, branch>
>
> That said you could just manipulate the git objects directly, no need
> to check out to the working dir.
>
> The server would only need to allow pushes to a refs/locks directory and be done.
> the client side would need to have a plumbing command, so you could easily integrate
> a git locking to your application if you don't want to provide a merge driver.
>
> Thanks,
> Stefan
>
next prev parent reply other threads:[~2015-06-09 18:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 14:45 GIT for Microsoft Access projects hackerp
2015-06-08 16:14 ` Konstantin Khomoutov
2015-06-08 22:02 ` Randall S. Becker
2015-06-09 13:54 ` Sitaram Chamarty
2015-06-09 17:19 ` git lock files (Was: GIT for Microsoft Access projects) Stefan Beller
2015-06-09 18:21 ` hackerp [this message]
2015-06-09 18:50 ` Konstantin Khomoutov
2015-06-09 19:08 ` Stefan Beller
2015-06-10 7:47 ` Fredrik Gustafsson
2015-06-10 15:22 ` Stefan Beller
2015-06-10 16:32 ` git lock files Junio C Hamano
2015-06-15 8:52 ` Thomas Koch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150609132144.ANWJW.73271.root@txifep04 \
--to=hackerp@suddenlink.net \
--cc=git@vger.kernel.org \
--cc=kostix+git@007spb.ru \
--cc=sbeller@google.com \
--cc=sitaramc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).