[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VC mode and git
From: |
Eli Zaretskii |
Subject: |
Re: VC mode and git |
Date: |
Fri, 27 Mar 2015 10:35:46 +0300 |
> Date: Thu, 26 Mar 2015 23:09:04 -0400
> From: Richard Stallman <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
>
> > Just to elaborate: neither vc-bzr nor vc-git nor vc-hg (the DVCS
> > interfaces) push on commit but our advertised bzr setup made bzr itself
> > push on commit by default (because it was a bound branch).
>
> If Git has no feature comparable to a bound branch, that seems like a defect
> compared with Bzr.
Personally, I agree, but the majority out there don't. Until a
motivated individual steps forward and adds this to Git, I don't think
we can hope to have such a feature.
> Perhaps we should supply that feature.
You mean, in Emacs? I don't think we can. The commit in a bound
branch was committing and pushing atomically, and I don't see how can
you do that by calling two separate Git commands.
> > In the same way, you could set up a git post-commit hook that pushes if
> > you wish by placing a scipt with contents
>
> > --8<---------------cut here---------------start------------->8---
> > #!/bin/sh
> > git push
> > --8<---------------cut here---------------end--------------->8---
>
> > in .git/hooks/post-commit/.
>
> That recommendation is rather cumbersome compared to our former
> recommendations for Bzr, but that change would be a step up
> in our Git recommendations for people starting with Git.
I don't recommend it, certainly not with this script, for 2 reasons:
. using the script, the commit+push are not an atomic operation, so
the commit could succeed, but the following push could fail,
leaving your repository out of sync
. it will be hard (or even impossible) to do a local commit without
pushing, because the hook will always be run; you need the local
commit for when you merge and resolve conflicts and in other
situations
So, unless someone comes with a smarter hook script that overcomes the
above deficiencies, I strongly recommend against using it.
- Re: VC mode and git, (continued)
- Re: VC mode and git, Richard Stallman, 2015/03/26
- Re: VC mode and git, Andreas Schwab, 2015/03/26
- Re: VC mode and git, Tassilo Horn, 2015/03/26
- Re: VC mode and git, Eli Zaretskii, 2015/03/26
- Re: VC mode and git, Dmitry Gutov, 2015/03/26
- Re: VC mode and git, Eli Zaretskii, 2015/03/26
- Re: VC mode and git, Richard Stallman, 2015/03/27
- Re: VC mode and git, Eli Zaretskii, 2015/03/27
- Re: VC mode and git, Richard Stallman, 2015/03/28
- Re: VC mode and git, Richard Stallman, 2015/03/26
- Re: VC mode and git,
Eli Zaretskii <=
- Re: VC mode and git, Stefan Monnier, 2015/03/27
- Re: VC mode and git, Eli Zaretskii, 2015/03/27
- Re: VC mode and git, Stefan Monnier, 2015/03/27
- Re: VC mode and git, Eli Zaretskii, 2015/03/27
- Re: VC mode and git, Tak Kunihiro, 2015/03/27
- Re: VC mode and git, Stefan Monnier, 2015/03/27
- Re: VC mode and git, Richard Stallman, 2015/03/28
- Re: VC mode and git, Yann Hodique, 2015/03/26
- Re: VC mode and git, Yuri Khan, 2015/03/25
- Re: VC mode and git, Eli Zaretskii, 2015/03/25