Git development
 help / color / mirror / Atom feed
* [BUG] Amending a shallow clone -> orphan branch
@ 2021-08-06  0:04 Alexandr Miloslavskiy
  2021-08-06 12:21 ` Bagas Sanjaya
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandr Miloslavskiy @ 2021-08-06  0:04 UTC (permalink / raw)
  To: git

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?

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

end of thread, other threads:[~2021-08-06 18:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-06  0:04 [BUG] Amending a shallow clone -> orphan branch Alexandr Miloslavskiy
2021-08-06 12:21 ` Bagas Sanjaya
2021-08-06 12:24   ` Alexandr Miloslavskiy
2021-08-06 12:27   ` Alexandr Miloslavskiy
2021-08-06 13:16   ` Alexandr Miloslavskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox