Thread (5 messages) 5 messages, 2 authors, 2021-08-06

[BUG] Amending a shallow clone -> orphan branch

flat view

From: Alexandr Miloslavskiy <hidden>
Date: 2021-08-06 08:29:49

Consider the following steps :

git clone --depth 1 --single-branch --branch master https://github.com/git/git
cd git
1.txt
git add 1.txt
git commit --amend

This results in an orphaned branch, where a single commit contains entire tree.

I understand that this is a bug, because certainly git knew shallow commit's parents and could reuse that when amending?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help