From: Victoria Dye <vdye@github.com>
To: Eric Musser <eric.musser@snowflake.com>, git@vger.kernel.org
Subject: Re: rebase update-refs can delete ref branch
Date: Thu, 8 Dec 2022 23:50:36 -0800 [thread overview]
Message-ID: <8edcef4f-4438-e07a-a6fb-698b6179fcc4@github.com> (raw)
In-Reply-To: <CAGW=zr_BD=7d5dZi+yO4cpufFi=jEjH=wQoTndDLfTi14UresQ@mail.gmail.com>
Hi Eric!
> [I am presented]:
> pick 2dd4408 commit 2 # empty
> update-ref other-branch
>
> pick 39f626e commit 3 # empty
>
> [I deleted first two lines and submitted]:
> pick 39f626e commit 3 # empty
>
> Successfully rebased and updated refs/heads/working-branch.
> Updated the following refs with --update-refs:
> refs/heads/other-branch
> $ git rev-parse other-branch
> other-branch
> fatal: ambiguous argument 'other-branch': unknown revision or path not
> in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
I believe this is the same bug as one reported back in October [1], where
deleting all 'update-ref' lines from the 'rebase-todo' inadvertently causes
the rebase to delete those refs. The bug was fixed in 44da9e0841 (rebase
--update-refs: avoid unintended ref deletion, 2022-11-07), so you shouldn't
see the issue anymore in Git that's built from newer revisions (e.g., the
latest pre-release v2.39.0-rc2 or the upcoming final v2.39.0).
I hope that helps!
- Victoria
[1] https://lore.kernel.org/git/CAFzd1+5F4zqQ1CNeY2xaaf0r__JmE4ECiBt5h5OdiJHbaE78VA@mail.gmail.com/
> [System Info]
> git version:
> git version 2.38.0
> cpu: aarch64
> built from commit: 3dcec76d9df911ed8321007b1d197c1a206dc164
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Linux 5.16.13-generic #2 SMP Fri Mar 11 12:48:38 UTC 2022 aarch64
> compiler info: gnuc: 10.2
> libc info: glibc: 2.17
> $SHELL (typically, interactive shell): /bin/bash
>
>
> [Enabled Hooks]
> pre-commit
next prev parent reply other threads:[~2022-12-09 7:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 23:00 rebase update-refs can delete ref branch Eric Musser
2022-12-09 7:50 ` Victoria Dye [this message]
2022-12-09 8:01 ` Junio C Hamano
2022-12-09 10:40 ` 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=8edcef4f-4438-e07a-a6fb-698b6179fcc4@github.com \
--to=vdye@github.com \
--cc=eric.musser@snowflake.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.