git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/6] rebase: --rewrite-{refs,heads,tags} to pull refs along with branch

From
Phil Hord <hordp@cisco.com>
Date
Jun 27, 2011, 16:11 UTC
Message-ID
<4E08ABBB.9060009@cisco.com>
In-Reply-To
<c2d11ffe876a540b6fad46e2ecc57a24018cfb73.1309133817.git.greg@quora.com>
On 11/18/2009 06:51 PM, Greg Price wrote:
Show 21 quoted lines
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 1bfe6a8..7c365ab 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -38,6 +38,9 @@ git-rebase [-i] --continue | --abort | --skip
>  v,verbose!         display a diffstat of what changed upstream
>  q,quiet!           be quiet. implies --no-stat
>  onto=!             rebase onto given branch instead of upstream
> +rewrite-heads!     rewrite intermediate heads on branch
> +rewrite-tags!      rewrite intermediate tags on branch
> +rewrite-refs=!     rewrite intermediate refs matching pattern
>  p,preserve-merges! try to recreate merges instead of ignoring them
>  s,strategy=!       use the given merge strategy
>  no-ff!             cherry-pick all commits, even if unchanged
> @@ -96,6 +99,7 @@ state_dir=
>  # One of {'', continue, skip, abort}, as parsed from command line
>  action=
>  preserve_merges=
> +rebase_refs=
>  autosquash=
>  test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
I think you meant to spell that "rewrite_refs=" instead of "rebase_refs=".
Show 21 quoted lines
>  
> @@ -246,6 +250,19 @@ do
>  		strategy="$1"
>  		do_merge=t
>  		;;
> +	--rewrite-refs)
> +		shift
> +		rewrite_refs="$rewrite_refs $1"
> +		test -z "$interactive_rebase" && interactive_rebase=implied
> +		;;
> +	--rewrite-heads)
> +		rewrite_refs="$rewrite_refs refs/heads"
> +		test -z "$interactive_rebase" && interactive_rebase=implied
> +		;;
> +	--rewrite-tags)
> +		rewrite_refs="$rewrite_refs refs/tags"
> +		test -z "$interactive_rebase" && interactive_rebase=implied
> +		;;
>  	-n)
>  		diffstat=
>  		;;
Then it matches the rest of the commit.
Phil
Previous: Greg PriceNext: Greg Price
Message 8 of 24 in “rebase: command "ref" and options --rewrite-{refs,heads,tags}”
  1. 0/6 rebase: command "ref" and options --rewrite-{refs,heads,tags}Greg Price, Jun 27, 2011
  2. 1/6 rebase -i: Add the "ref" commandGreg Price, Oct 10, 2009
  3. Junio C HamanoJun 27, 2011
  4. Greg PriceJun 28, 2011
  5. 2/6 pretty: Add %D for script-friendly decorationGreg Price, Nov 18, 2009
  6. Junio C HamanoJun 27, 2011
  7. 4/6 rebase: --rewrite-{refs,heads,tags} to pull refs along with branchGreg Price, Nov 18, 2009
  8. Phil HordJun 27, 2011
  9. Greg PriceJun 28, 2011
  10. 3/6 for-each-ref: --stdin to match specified refs against patternGreg Price, Jan 7, 2010
  11. 5/6 t/lib-rebase.sh: pass through ref commandsGreg Price, Jan 25, 2010
  12. 6/6 rebase --rewrite-refs: testsGreg Price, Jan 25, 2010
  13. Phil HordJun 27, 2011
  14. Greg PriceJun 28, 2011
  15. Junio C HamanoJun 27, 2011
  16. Greg PriceJun 28, 2011
  17. Junio C HamanoJun 27, 2011
  18. Greg PriceJun 28, 2011
  19. Greg PriceJun 28, 2011
  20. Ramkumar RamachandraJun 30, 2011
  21. Sverre RabbelierAug 3, 2011
  22. Greg PriceAug 3, 2011
  23. Junio C HamanoJun 27, 2011
  24. Greg PriceJun 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.