From: Wesley <wesleys@opperschaap.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: phillip.wood@dunelm.org.uk, git@vger.kernel.org
Subject: Re: [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint
Date: Fri, 1 Sep 2023 21:35:33 -0400 [thread overview]
Message-ID: <fa702b47-ae29-4299-9226-4920620b9fff@opperschaap.net> (raw)
In-Reply-To: <xmqqledppxw3.fsf@gitster.g>
On 9/1/23 14:10, Junio C Hamano wrote:
> Wesley <wesleys@opperschaap.net> writes:
>
>> The quirk is this: --fork-point looks at the reflog and reflog is
>> local. Meaning, having an remote upstream branch will make
>> --fork-point a noop. Only where you have an upstream which is local
>> and your reflog has seen dropped commits it does something.
>
> Why do you lack reflog on your remote-tracking branches in the first
> place?
I do not know? I tested with a bare repo and two clones. And I also
tested it with just a remote upstream in another branch.
When in repo-1 I do the reset --hard HEAD^, and push the results, and
pull them in in repo-2 the behavior doesn't replicate. The git reflog
command doesn't show the reset.
However, if I delete the reflog entry for removal of the reset HEAD^,
git rebase exposes the fork-point behavior.
> The fork-point heuristics, as far as I understand it, was invented
> exactly to protect you from your upstream repository rewinding and
> rebuilding the branch you have been building on top of. The default
> fetch refspec +refs/heads/*:refs/remotes/origin/* has the "force"
> option "+" in front exactly because the fetching repository is
> expected to keep the reflog for remote-tracking branches to help
> recovering from such a rewind & rebuild.
I haven't force pushed anything btw, maybe that could explain things?
Cheers,
Wesley
--
Wesley
Why not both?
next prev parent reply other threads:[~2023-09-02 1:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 20:34 [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint Wesley Schwengle
2023-08-19 20:34 ` Wesley Schwengle
2023-08-31 20:57 ` Junio C Hamano
2023-08-31 21:52 ` Junio C Hamano
2023-09-01 13:33 ` Phillip Wood
2023-09-01 16:48 ` Junio C Hamano
2023-09-02 22:16 ` [PATCH v2] " Wesley Schwengle
2023-09-02 22:16 ` [PATCH v2 1/3] rebase.c: Make a distiction between rebase.forkpoint and --fork-point arguments Wesley Schwengle
2023-09-02 22:16 ` [PATCH v2 2/3] builtin/rebase.c: Emit warning when rebasing without a forkpoint Wesley Schwengle
2023-09-02 23:37 ` Junio C Hamano
2023-09-03 2:29 ` Wesley
2023-09-03 4:50 ` Junio C Hamano
2023-09-03 12:34 ` Wesley Schwengle
2023-09-05 22:01 ` Junio C Hamano
2023-09-04 10:16 ` Phillip Wood
2023-09-02 22:16 ` [PATCH v2 3/3] git-rebase.txt: Add deprecation notice to the --fork-point options Wesley Schwengle
2023-09-01 13:19 ` [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint Phillip Wood
2023-09-01 17:13 ` Wesley
2023-09-01 18:10 ` Junio C Hamano
2023-09-02 1:35 ` Wesley [this message]
2023-09-02 22:36 ` Junio C Hamano
2023-08-19 20:34 ` [PATCH 2/2] git-rebase.txt: Add deprecation notice to the --fork-point options Wesley Schwengle
2023-08-31 14:44 ` [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint Wesley Schwengle
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa702b47-ae29-4299-9226-4920620b9fff@opperschaap.net \
--to=wesleys@opperschaap.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
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).