git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything?
@ 2022-01-31 11:01 Josef Wolf
  2022-01-31 15:51 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
  2022-01-31 23:30 ` brian m. carlson
  0 siblings, 2 replies; 3+ messages in thread
From: Josef Wolf @ 2022-01-31 11:01 UTC (permalink / raw)
  To: git

Hello,

I've added "* text=auto" to an existing repo with a completely linear history.

Now, as expected, every rebase operation gives me lots of conflicts, which are
hard to resolve.

So I'd like to clean up the history:

  $ git rebase -Xrenormalize -i $REBASE_SHA

But this turns out to be a no-op? It says immediately

  Successfully rebased and updated refs/heads/wip-normalize

without even the counter which is usually output to show progress during an
interactive rebase as it is working through the rebase-todo. I can confirm
that nothing has happened by checking the sha of the branch.

So, what am I missing? How would I renormalize all the commits of a branch?
The branch has linear history, no merges there.

Thanks,

-- 
Josef Wolf
jw@raven.inka.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything?
  2022-01-31 11:01 Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything? Josef Wolf
@ 2022-01-31 15:51 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
  2022-01-31 23:30 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: Torsten =?unknown-8bit?Q?B=C3=B6gershausen?= @ 2022-01-31 15:51 UTC (permalink / raw)
  To: Josef Wolf, git

On Mon, Jan 31, 2022 at 12:01:50PM +0100, Josef Wolf wrote:
> Hello,
>
> I've added "* text=auto" to an existing repo with a completely linear history.

What exactly does this mean ?
Is there one branch, several branches ?
No merges at all ?

>
> Now, as expected, every rebase operation gives me lots of conflicts, which are
> hard to resolve.
>
> So I'd like to clean up the history:
>
>   $ git rebase -Xrenormalize -i $REBASE_SHA
>
> But this turns out to be a no-op? It says immediately
>
>   Successfully rebased and updated refs/heads/wip-normalize
>
> without even the counter which is usually output to show progress during an
> interactive rebase as it is working through the rebase-todo. I can confirm
> that nothing has happened by checking the sha of the branch.
>
> So, what am I missing? How would I renormalize all the commits of a branch?
That is a tricky question.
If you renormalize all commits of one branch,
you create a complete new history, right ?
Just out of interest:
Why do you want to do this ?
And I have the slight feeling, that Git does not support this
"renormalize all the commits of a branch" workflow, but I may be wrong.

Is you repo public ?
Or could you come up with an example ?

> The branch has linear history, no merges there.
>
> Thanks,
>
> --
> Josef Wolf
> jw@raven.inka.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything?
  2022-01-31 11:01 Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything? Josef Wolf
  2022-01-31 15:51 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
@ 2022-01-31 23:30 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2022-01-31 23:30 UTC (permalink / raw)
  To: Josef Wolf, git

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

On 2022-01-31 at 11:01:50, Josef Wolf wrote:
> Hello,
> 
> I've added "* text=auto" to an existing repo with a completely linear history.
> 
> Now, as expected, every rebase operation gives me lots of conflicts, which are
> hard to resolve.
> 
> So I'd like to clean up the history:
> 
>   $ git rebase -Xrenormalize -i $REBASE_SHA
> 
> But this turns out to be a no-op? It says immediately
> 
>   Successfully rebased and updated refs/heads/wip-normalize
> 
> without even the counter which is usually output to show progress during an
> interactive rebase as it is working through the rebase-todo. I can confirm
> that nothing has happened by checking the sha of the branch.
> 
> So, what am I missing? How would I renormalize all the commits of a branch?
> The branch has linear history, no merges there.

I think what you probably want is to add the -f option.  By default, Git
doesn't perform a rebase when the current branch is up to date with the
base branch.  If you want to do it anyway, in this case, to rewrite
commits, then -f should make that happen.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-31 23:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 11:01 Why won't "git rebase -Xrenormalize -i $REBASE_SHA" do anything? Josef Wolf
2022-01-31 15:51 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-01-31 23:30 ` brian m. carlson

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).