Re: [bug] user may be cornered into delete files #9901

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-11-14 at 17:53:15, A bughunter wrote:
>  [bug] user may be cornered into delete files #9901 pls see https://github.com/cli/cli/issues/9901 and look into all of the links.

What you're describing sounds like a network problem of some sort.  I
don't believe this is a bug in Git because Git handles this kind of
thing on a regular basis without a problem.

The only thing which might potentially be a problem on the Git side is
that I don't know if we try to hold the connection open without sending
a sideband during pack generation, in which case if the client side
doesn't send anything at all, then the connection might be closed by the
server.  I'll point out that GitHub sends SSH keepalives, so typically
the connection should not be reset unless the connection actually
drops.

However, you could try pushing over HTTPS instead, which won't try to
make the connection until the pack is generated, so even if we do what I
suggested might be a problem above, that wouldn't affect HTTPS.

I will mention that the repository you mentioned there contains a large
number of TIFF images about 1–2 MB in size.  These TIFFs appear to be
using JPEG compression, so when Git tries to deltify them (during the
"Compressing objects" stage), that step is just going to waste a lot of
CPU and take a long time, since trying to deltify compressed objects
doesn't work and is just slow.  That's contributing to the slow push
performance.

In general, Git is not a great way to store large numbers of compressed
images.  If you're going to store images in your repository, you should
make them uncompressed (which you can do with TIFFs) so that Git can
store them more efficiently.  What would be even better, since your data
appears to be effectively a book, is to store the data as text, possibly
with a small set of images for illustrations, instead of storing the
book as a set of images.  That would be much more searchable and
accessible as well.  The Git FAQ[0] mentions this and makes
recommendations on approach.

Overall, I would not say this is a bug in Git.  Pushing over HTTPS may
help you get your pushes working in a more robust way, but in general,
I'd recommend storing the data in your repository differently.

[0] https://git-scm.com/docs/gitfaq#recommended-storage-settings
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux