From: Dmitry Potapov <dpotapov@gmail.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Mario Pareja <mpareja.dev@gmail.com>,
Andreas Ericsson <ae@op5.se>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Locking binary files
Date: Wed, 24 Sep 2008 03:21:54 +0400 [thread overview]
Message-ID: <20080923232154.GW21650@dpotapov.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0809231811560.19665@iabervon.org>
On Tue, Sep 23, 2008 at 06:29:53PM -0400, Daniel Barkalow wrote:
> On Wed, 24 Sep 2008, Dmitry Potapov wrote:
>
> > It still will happen if developers work on topic branches, and it is not
> > a rate situation with Git. Thus locking some particular path is stupid.
> > What you may want instead is too mark SHA-1 of this file as being edited
> > and later maybe as being replaced with another one. In this case, anyone
> > who has the access to the central information storage will get warning
> > about attempt to edit a file that is edited or already replaced with a
> > new version.
>
> No, your goal is to avoid having to do a merge in order to do a particular
> push. That push is the push to the shared location. It doesn't matter if
> you use topic branches, because your eventual goal is still to push to the
> shared location (or, possibly, to have the project maintainer push to the
> shared location with some sort of interesting delegation), so you lock the
> shared location, not your topic branch.
What are you saying is that when I am locking some file on the current
branch, Git (or whatever script that performs this locking) should figure
out what is the original shared branch for it and lock the file there.
When you have finished to edit and push changes then the lock should be
removed if changes are pushed to this shared branch, otherwise it should
be some token of delegation to the project maintainer who is going to
push (or probably first merge, because other files may need that) to
this branch.
Maybe, it can work, but it sounds too complex to me. I believe that my
idea using SHA-1 is better. After all, what is file? It is its content.
At least, in Git, we always identify files by their content. Thus if you
lock some file, you put a lock on certain SHA-1. Now, regardless of
branches and paths, this lock can work provided that you have access to
some shared location. Of course, this lock is purely advisory, but it is
good, because you may want to ignore it in some case. For instance, you
want to created a new branch based on the current shared location and
have no plan to ever merge it back. In this case, the lock on the shared
branch should not matter to you. This is true regardless how you
implement locking, and in your scheme it will another special case.
Dmitry
next prev parent reply other threads:[~2008-09-23 23:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94c1db200809222333q4953a6b9g8ce0c1cd4b8f5eb4@mail.gmail.com>
2008-09-23 6:39 ` Locking binary files Mario Pareja
2008-09-23 7:18 ` Andreas Ericsson
[not found] ` <94c1db200809230054t20e7e61dh5022966d4112eee6@mail.gmail.com>
2008-09-23 8:31 ` Andreas Ericsson
2008-09-23 13:56 ` Mario Pareja
2008-09-23 14:28 ` Alex Riesen
2008-09-23 17:32 ` Daniel Barkalow
2008-09-23 19:49 ` Junio C Hamano
2008-09-23 21:13 ` Daniel Barkalow
2008-09-23 21:54 ` Dmitry Potapov
2008-09-23 22:29 ` Daniel Barkalow
2008-09-23 23:21 ` Dmitry Potapov [this message]
2008-09-24 4:15 ` Daniel Barkalow
2008-09-24 15:00 ` Dmitry Potapov
2008-09-23 20:46 ` Dmitry Potapov
2008-09-23 11:16 ` Boaz Harrosh
2008-09-23 11:20 ` Boaz Harrosh
2008-09-23 14:14 ` Mario Pareja
2008-09-23 14:35 ` Boaz Harrosh
2008-09-23 13:44 ` Dmitry Potapov
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=20080923232154.GW21650@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=ae@op5.se \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mpareja.dev@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).