git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
To: Theodore Ts'o <tytso@mit.edu>
Cc: git@vger.kernel.org, Per Cederqvist <cederp@opera.com>
Subject: Re: [PATCH] guilt: force the use of bare branches
Date: Tue, 21 May 2013 23:29:47 -0400	[thread overview]
Message-ID: <20130522032946.GA101217@meili.valhalla.31bits.net> (raw)
In-Reply-To: <1369191357-6777-1-git-send-email-tytso@mit.edu>

On Tue, May 21, 2013 at 10:55:57PM -0400, Theodore Ts'o wrote:
> To make it harder to accidentally do "git push" with a guilt patch
> applied, "guilt push" changes branch from e.g. "master" to
> "guilt/master" starting with commit 67d3af63f422.  This is a feature
> which I use for ext4 development; I actually *do* want to be able to
> push patches to the dev branch, which is a rewindable branch much like
> git's "pu" branch.
> 
> Allow the use of the environment variable GUILT_FORCE_BARE_BRANCH
> which disables the new behavior introduced by commit 67d3af63f422.

Would it make sense to make it git-config-able instead?  As an added bonus,
one can then make the decision on per-repository basis.

Jeff.

> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Per Cederqvist <cederp@opera.com>
> ---
>  guilt | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/guilt b/guilt
> index 309437a..9953bdf 100755
> --- a/guilt
> +++ b/guilt
> @@ -914,13 +914,22 @@ else
>  	die "Unsupported operating system: $UNAME_S"
>  fi
>  
> -if [ "$branch" = "$raw_git_branch" ] && [ -n "`get_top 2>/dev/null`" ]
> -then
> -    # This is for compat with old repositories that still have a
> -    # pushed patch without the new-style branch prefix.
> +if [ -n "`get_top 2>/dev/null`" ]; then
> +  #
> +  # If we have repositories patches pushed, then use whatever scheme
> +  # is currently in use
> +  #
> +  if [ "$branch" = "$raw_git_branch" ]; then
>      old_style_prefix=true
> +  else
> +    old_style_prefix=false
> +  fi
>  else
> +  if [ -n "$GUILT_FORCE_BARE_BRANCH" ]; then
> +    old_style_prefix=true
> +  else
>      old_style_prefix=false
> +  fi
>  fi
>  
>  _main "$@"
> -- 
> 1.7.12.rc0.22.gcdd159b
> 

-- 
Linux, n.:
  Generous programmers from around the world all join forces to help
  you shoot yourself in the foot for free. 

  reply	other threads:[~2013-05-22  3:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22  2:55 [PATCH] guilt: force the use of bare branches Theodore Ts'o
2013-05-22  3:29 ` Josef 'Jeff' Sipek [this message]
2013-05-22 12:11   ` [PATCH -v2] " Theodore Ts'o
2013-05-22 12:39     ` Per Cederqvist
2013-05-22 13:01     ` [PATCH] Added guilt.reusebranch configuration option Per Cederqvist
2013-05-22 13:42       ` Josef 'Jeff' Sipek
2013-05-22 14:45         ` Theodore Ts'o
2013-05-22 16:31           ` Josef 'Jeff' Sipek
2013-05-22 17:58           ` Junio C Hamano
2013-05-22 18:04             ` Theodore Ts'o
2013-05-22 18:55               ` Junio C Hamano
2013-05-23  2:11                 ` Theodore Ts'o
2013-05-23  9:52                   ` Ramkumar Ramachandra
2013-05-23 18:37                     ` Theodore Ts'o
2013-05-23 19:06                       ` Ramkumar Ramachandra
2013-05-23 19:14                       ` Junio C Hamano
2013-05-23 19:01                   ` Junio C Hamano

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=20130522032946.GA101217@meili.valhalla.31bits.net \
    --to=jeffpc@josefsipek.net \
    --cc=cederp@opera.com \
    --cc=git@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).