From: Jonathan Nieder <jrnieder@gmail.com>
To: Christian Engwer <christian.engwer@wwu.de>
Cc: Eric Wong <normalperson@yhbt.net>, git@vger.kernel.org
Subject: Re: [PATCH] prohibit "svn dcommit" on remote-tracking-branches
Date: Sun, 15 Apr 2012 16:23:58 -0500 [thread overview]
Message-ID: <20120415212358.GA5813@burratino> (raw)
In-Reply-To: <20120415185535.GA9150@mathe-macht-spass.de>
(dropping cc to debian bug)
Hi Christian,
Christian Engwer wrote:
> a) prohibit commit if a remote-tracking branch is used
> b) allow commit if --commit-url is used
> c) allow commit if the allow-dcommit flag is true in .git/config
As I mentioned before, I really do want to be able to dcommit from my
current branch, even if it is not called "master" and is set up,
intentionally or not, to pull from a remote git repository. I would
be a bit bewildered if git required me to say "yes, please do perform
the action I already requested of you" in order to do that, and I do
not think I am the only one.
On the other hand, I believe it would be useful to be able to prevent
_all_ rebasing on some branches to avoid fat-finger accidents. It
would be especially useful for new users who do not know how to
recover. This includes the rebasing performed using "git rebase" or
"git reset" by "git svn rebase".
Therefore I would be much happier to see git svn learn a pre-dcommit
hook (see githooks(5)) that can handle multiple situations than the
check that follows the particular policy you have specified above.
That said. I am reluctant to make the following comment because
I really would love to have that pre-dcommit hook and I do not want to
take away a use case for it. ;-)
Until some interested person introduces a pre-dcommit hook, would it
make sense in your deployment to add a wrapper around "git svn
dcommit" (let's call it git-commit-to-svn) on the $PATH that performs
the check itself, so the user experience would be as follows?
$ git commit-to-svn
fatal: this branch is set up to push to git, not to svn
hint: switch to a new branch before pushing
hint: or use "git commit-to-svn --force" to override this check
That already works. It does not require any change to git. What do
you think?
Just my two cents,
Jonathan
prev parent reply other threads:[~2012-04-15 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 8:42 [PATCH] prohibit "svn dcommit" on remote-tracking-branches Christian Engwer
2012-04-10 21:17 ` Eric Wong
2012-04-15 13:40 ` Christian Engwer
2012-04-15 18:55 ` Christian Engwer
2012-04-15 21:23 ` Jonathan Nieder [this message]
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=20120415212358.GA5813@burratino \
--to=jrnieder@gmail.com \
--cc=christian.engwer@wwu.de \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/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).