{"thread":{"id":"62491","subject":"[bug] user may be cornered into delete files #9901","startedAt":"2024-11-14T17:53:20Z","lastAt":"2024-11-18T22:04:58Z","messageCount":7,"participants":["A bughunter","brian m. carlson","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"507291","messageId":"P_ttzPnNTtUgpAy8cg_ntLvwskJhz7cmv-fFgDw0K4Y2vOCx8v_AXxHtHEuBtpREOQu9pxpvK6JgLusc5Uyn2wDZ4HZvC3ttM4k-Ry6jBs8=@proton.me","threadId":"62491","inReplyTo":null,"subject":"[bug] user may be cornered into delete files #9901","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-14T17:53:15Z","receivedAt":"2024-11-14T17:53:20Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\n [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. \n\n\n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc2OQgJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAAMpYAP92jH1GmK/fhQDScPH7WylcYaYatoIkZGTKhYGtvAcWdQEAqa9I\n34yBlDPlbMPExwW6vNJEk0gzwHLKbZjgXO2WrAA=\n=0D8V\n-----END PGP SIGNATURE-----\n"},{"id":"507292","messageId":"ZJaaSrglj_jUGE-7IfLWHaUIKKLGlw1SJfPP8MeyvdVKO7iMFhbTQaBKeJVLePFGkw3Dvo1co7B6MBKkTN7v5J6hRqjb8yHiB6_-4H8PnAs=@proton.me","threadId":"62491","inReplyTo":"P_ttzPnNTtUgpAy8cg_ntLvwskJhz7cmv-fFgDw0K4Y2vOCx8v_AXxHtHEuBtpREOQu9pxpvK6JgLusc5Uyn2wDZ4HZvC3ttM4k-Ry6jBs8=@proton.me","subject":"Fw: [bug] user may be cornered into delete files #9901","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-14T17:56:43Z","receivedAt":"2024-11-14T17:56:49Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"\n\n\n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n\n------- Forwarded Message -------\nFrom: A bughunter <A_bughunter@proton.me>\nDate: On Thursday, November 14th, 2024 at 17:53\nSubject: [bug] user may be cornered into delete files #9901\nTo: git@vger.kernel.org <git@vger.kernel.org>\n\n\n> [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.\n> \n> \n> \n> from A_bughunter@proton.me\n> \n> Sent with Proton Mail secure email."},{"id":"507293","messageId":"XdBUcr7M60BIudOE7vay5rAdPqP06WOrPnt0ORM8QtlkEr980kTDIxtCJUySclvxfuFiyinGtvTmCBrhe4Y4mtwZcNgseoTb6JtzgIjrwWI=@proton.me","threadId":"62491","inReplyTo":"ZJaaSrglj_jUGE-7IfLWHaUIKKLGlw1SJfPP8MeyvdVKO7iMFhbTQaBKeJVLePFGkw3Dvo1co7B6MBKkTN7v5J6hRqjb8yHiB6_-4H8PnAs=@proton.me","subject":"Fw: [bug] user may be cornered into delete files #9901","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-14T18:03:44Z","receivedAt":"2024-11-14T18:03:50Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"\n\n\n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n\n------- Forwarded Message -------\nFrom: A bughunter <A_bughunter@proton.me>\nDate: On Thursday, November 14th, 2024 at 17:56\nSubject: Fw: [bug] user may be cornered into delete files #9901\nTo: git@vger.kernel.org <git@vger.kernel.org>\n\n\n>\n>\n>\n>\n> from A_bughunter@proton.me\n>\n> Sent with Proton Mail secure email.\n>\n>\n> ------- Forwarded Message -------\n> From: A bughunter A_bughunter@proton.me\n>\n> Date: On Thursday, November 14th, 2024 at 17:53\n> Subject: [bug] user may be cornered into delete files #9901\n> To: git@vger.kernel.org git@vger.kernel.org\n>\n>\n>\n> > [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.\n> >\n> > from A_bughunter@proton.me\n> >\n> > Sent with Proton Mail secure email."},{"id":"507300","messageId":"ZzaJzm4kyYbcDSgm@tapette.crustytoothpaste.net","threadId":"62491","inReplyTo":"P_ttzPnNTtUgpAy8cg_ntLvwskJhz7cmv-fFgDw0K4Y2vOCx8v_AXxHtHEuBtpREOQu9pxpvK6JgLusc5Uyn2wDZ4HZvC3ttM4k-Ry6jBs8=@proton.me","subject":"Re: [bug] user may be cornered into delete files #9901","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-11-14T23:37:50Z","receivedAt":"2024-11-14T23:46:43Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-11-14 at 17:53:15, A bughunter wrote:\n>  [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.\n\nWhat you're describing sounds like a network problem of some sort.  I\ndon't believe this is a bug in Git because Git handles this kind of\nthing on a regular basis without a problem.\n\nThe only thing which might potentially be a problem on the Git side is\nthat I don't know if we try to hold the connection open without sending\na sideband during pack generation, in which case if the client side\ndoesn't send anything at all, then the connection might be closed by the\nserver.  I'll point out that GitHub sends SSH keepalives, so typically\nthe connection should not be reset unless the connection actually\ndrops.\n\nHowever, you could try pushing over HTTPS instead, which won't try to\nmake the connection until the pack is generated, so even if we do what I\nsuggested might be a problem above, that wouldn't affect HTTPS.\n\nI will mention that the repository you mentioned there contains a large\nnumber of TIFF images about 1–2 MB in size.  These TIFFs appear to be\nusing JPEG compression, so when Git tries to deltify them (during the\n\"Compressing objects\" stage), that step is just going to waste a lot of\nCPU and take a long time, since trying to deltify compressed objects\ndoesn't work and is just slow.  That's contributing to the slow push\nperformance.\n\nIn general, Git is not a great way to store large numbers of compressed\nimages.  If you're going to store images in your repository, you should\nmake them uncompressed (which you can do with TIFFs) so that Git can\nstore them more efficiently.  What would be even better, since your data\nappears to be effectively a book, is to store the data as text, possibly\nwith a small set of images for illustrations, instead of storing the\nbook as a set of images.  That would be much more searchable and\naccessible as well.  The Git FAQ[0] mentions this and makes\nrecommendations on approach.\n\nOverall, I would not say this is a bug in Git.  Pushing over HTTPS may\nhelp you get your pushes working in a more robust way, but in general,\nI'd recommend storing the data in your repository differently.\n\n[0] https://git-scm.com/docs/gitfaq#recommended-storage-settings\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"507314","messageId":"TOa5gGm8tmncWfFotfGhpWsRxDWvHH74skCKqc0_QPbRuWLvm-JFnDK8Y6SQxWooczbInHWtDbmmznLrDbr1pPSZ7vvPIlUAP9dSZcydRpg=@proton.me","threadId":"62491","inReplyTo":"E864saUi2ZoNwlZE8pH1_m9QQ2-E48w-hUk3GxH02I3_djQS_NLKyq3vbwbf39pf-RuAQUzds2kx0-RNZepTb4iEVKs5qPiJz2eKHuLZxT4=@proton.me","subject":"Fw: Re: [bug] user may be cornered into delete files #9901","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-15T05:15:48Z","receivedAt":"2024-11-15T05:16:01Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"My reply for git mailing list about the bug and more for brian is here forwarded because the reply button reply's to the sender and not the mailing list. See more for brian after the reply. \n\nfrom A_bughunter@proton.me\n\nSent with Proton Mail secure email.\n\n------- Forwarded Message -------\nFrom: A bughunter <A_bughunter@proton.me>\nDate: On Friday, November 15th, 2024 at 04:31\nSubject: Re: [bug] user may be cornered into delete files #9901\nTo: brian m. carlson <sandals@crustytoothpaste.net>\n> My reply to brian m. carlson.\n> \n> No, you brian seem to be missing what the bug is my complaint is this:\n> if the initial push fails (for any reason) then the user must reset thus deleting files. My capacity is new to git as you would see on my github.com/freedom-foundation profile. You can run the problem again and see if a --soft reset would evade having to delete files. Help resources instructed hard reset when asking how to undo a commit because push fails. Can a --soft reset undo add without deleting the files which initially have no backup. Bear in mind the files could be anything, text, tiff is not part of the bugreport. Any initial files would have to be deleted if push fails for any reason is the bugreport.\n> \nbrian, I was not impressed that you could not gather what my bugreport was before I rephrased it.\n\nbrian, For years my files have been the victim of vandalism and hex editors, and likely everybody's files are because I have yet to meet anybody whome can describe how to perfectly checksum text.\n I get what you say brian about a text file instead of TIFF but the conversion to text from TIFF is a long drawn out process which may take a while so I have stored the original TIFF which is further necesarry to authenticate the sources of The Book. Unicode is a problem see here github.com/freedom-foundation/unicode-map . Can you help to build an ANSI ASCII only Linux kernel because the Unicode is a problem and Unicode is in the Linux kernel. In order to convert The Book to text I need 7-bit ASCII ( see here https://github.com/freedom-foundation/ASCII-format-for-Network-Interchange ) and for checksums to remain stable either BOM or a BOM notation along with the checksum. Unicode is a problem because you cannot checksum text while fighting against vandalism and binary/hex editors.You may know also calibrating OCR such as tesseract is not a snap and may need about ten percent of total size to be corrected which is effectually dilligently re-reading The Book that being the case it is about as easy to type it by hand instead of using OCR such as tesseract while fighting vandalism and binary/hex editors which impeade the process. The process cannot be verified without checksums while protecting against corruption. While. \n> \n> from A_bughunter@proton.me\n> \n> Sent with Proton Mail secure email.\n> \n> \n> On Thursday, November 14th, 2024 at 23:37, brian m. carlson sandals@crustytoothpaste.net wrote:\n> \n> > On 2024-11-14 at 17:53:15, A bughunter wrote:\n> > \n> > > [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.\n> > \n> > What you're describing sounds like a network problem of some sort. I\n> > don't believe this is a bug in Git because Git handles this kind of\n> > thing on a regular basis without a problem.\n> > \n> > The only thing which might potentially be a problem on the Git side is\n> > that I don't know if we try to hold the connection open without sending\n> > a sideband during pack generation, in which case if the client side\n> > doesn't send anything at all, then the connection might be closed by the\n> > server. I'll point out that GitHub sends SSH keepalives, so typically\n> > the connection should not be reset unless the connection actually\n> > drops.\n> > \n> > However, you could try pushing over HTTPS instead, which won't try to\n> > make the connection until the pack is generated, so even if we do what I\n> > suggested might be a problem above, that wouldn't affect HTTPS.\n> > \n> > I will mention that the repository you mentioned there contains a large\n> > number of TIFF images about 1–2 MB in size. These TIFFs appear to be\n> > using JPEG compression, so when Git tries to deltify them (during the\n> > \"Compressing objects\" stage), that step is just going to waste a lot of\n> > CPU and take a long time, since trying to deltify compressed objects\n> > doesn't work and is just slow. That's contributing to the slow push\n> > performance.\n> > \n> > In general, Git is not a great way to store large numbers of compressed\n> > images. If you're going to store images in your repository, you should\n> > make them uncompressed (which you can do with TIFFs) so that Git can\n> > store them more efficiently. What would be even better, since your data\n> > appears to be effectively a book, is to store the data as text, possibly\n> > with a small set of images for illustrations, instead of storing the\n> > book as a set of images. That would be much more searchable and\n> > accessible as well. The Git FAQ[0] mentions this and makes\n> > recommendations on approach.\n> > \n> > Overall, I would not say this is a bug in Git. Pushing over HTTPS may\n> > help you get your pushes working in a more robust way, but in general,\n> > I'd recommend storing the data in your repository differently.\n> > \n> > [0] https://git-scm.com/docs/gitfaq#recommended-storage-settings\n> > --\n> > brian m. carlson (they/them or he/him)\n> > Toronto, Ontario, CA"},{"id":"507350","messageId":"20241115093214.GA1749331@coredump.intra.peff.net","threadId":"62491","inReplyTo":"ZzaJzm4kyYbcDSgm@tapette.crustytoothpaste.net","subject":"Re: [bug] user may be cornered into delete files #9901","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-11-15T09:32:14Z","receivedAt":"2024-11-15T09:32:24Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 14, 2024 at 11:37:50PM +0000, brian m. carlson wrote:\n\n> The only thing which might potentially be a problem on the Git side is\n> that I don't know if we try to hold the connection open without sending\n> a sideband during pack generation, in which case if the client side\n> doesn't send anything at all, then the connection might be closed by the\n> server.  I'll point out that GitHub sends SSH keepalives, so typically\n> the connection should not be reset unless the connection actually\n> drops.\n\nYes, we'll hold the connection open for git-over-ssh. We can't generate\nthe pack until we've seen what the other side advertises, and it's\nprobably too heavy-weight to start a second ssh connection. Even with\nssh keepalives, I would not be surprised if the process terminating the\nGit-level protocol conversation on the server side had some internal\ntimeouts.\n\nThere are Git-level keepalives during the similar compression operation\nof a clone/fetch, as well as the delta resolution for the server side of\na push. But there's nothing during the client-side compression.\n\nI know we've discussed this on the list before, but I couldn't find\nanything substantive, and certainly not patches. I think it would\n_probably_ work for the client to send 0-length pktlines (actual \"0004\",\nnot \"0000\" flushes) every few seconds while it's waiting. But it would\nbe the first time we've done so from the client side, and the first time\nwe've done it outside of sideband framing. So it's possible a server\nmight not like it (in which case we'd probably need a new protocol\nextension).\n\n> Overall, I would not say this is a bug in Git.  Pushing over HTTPS may\n> help you get your pushes working in a more robust way, but in general,\n> I'd recommend storing the data in your repository differently.\n\nI agree with everything you said, but I wanted to add one more\nworkaround: running \"git gc\" locally will pack all of those objects into\na single pack. And then the subsequent push should be fast, because\nwe'll already have done the delta search.\n\n-Peff\n"},{"id":"507538","messageId":"kQjk0kPkRFcFhFJzAV12mEO_0RDHGLeoWoxbFVwNfXa_i5MJ4o37D-BHTdCnIS6a0EwTKprHrAY3tHl8OPZ_9wpXByHFk0gP8JUlpUmJuIg=@proton.me","threadId":"62491","inReplyTo":"E864saUi2ZoNwlZE8pH1_m9QQ2-E48w-hUk3GxH02I3_djQS_NLKyq3vbwbf39pf-RuAQUzds2kx0-RNZepTb4iEVKs5qPiJz2eKHuLZxT4=@proton.me","subject":"Re: [bug] user may be cornered into delete files #9901","fromName":"A bughunter","fromEmail":"a_bughunter@proton.me","sentAt":"2024-11-18T22:04:48Z","receivedAt":"2024-11-18T22:04:58Z","isPatch":false,"sender":{"key":"a_bughunter@proton.me","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA512\n\nBROAD OVERVIEW\n\nbugreport[A], question[B] and use-case[C]. These are all related but separate threads for the purposes as labled. Please do not cross-post or cross-quote. Focus on productivity and solving these. You are welcomed to view and participate in all of these as I contribute more.\n\nuse-case[C] - git question (short) rephrase with use-case added.\n\nADD, ADD, ADD why cant they get that: ADD. ADD tracks files for commit. It's already been commit : push failed. Failed pushes piled up. I need them untracked. How do you undo an add ( many adds): simple question. Without deleting any files, to repush 1 by 1.\n\nI suspect the answer is: \"you can't - git provides no means to do so\" - a defect, bug as we call it. The answer to this use-case question likely will confirm my bugreport and I get the feeling this is why they will not answer the question they do not want to accept my bugreport and have a bad spirit to argue. The excuses they give for this will be that it is not typical: This can normally be solved by repushing. However it is still a defect and in my use-case there is a slow or intermittent connection and no sha-backups yet because this is the initial creation of a repo. \n\nThe above question is a use-case[C] seeking how to undo without deleting files. There shouldn't be any need to know a use-case in order to answer a technical question. I am open to discuss my use-case on this thread. The use-case if of this repo github.com/freedom-foundation/kjbible\n\nMy original bug report is that the user \" may be cornered into delete files\" bugreport[A] Summary as of 20241117 brian does not believe it's a bug and begins chattering to Peff about how to fix the bug \"There are Git-level keepalives during the similar compression operation\".\n\nThe full question[B] which is a child of the bugreport[A] is here. Summary as of 20241117 my question was mostly sidestepped and spammed whilst the thread devolved into a political drama about code_of_conduct. I am not open to discuss my use-case on this thread.\n\n\n[A]: https://lore.kernel.org/git/20241115093214.GA1749331@coredump.intra.peff.net/#r\n\n[B]: https://lore.kernel.org/git/xmqqr079xty7.fsf@gitster.g/T/#t\n\n[C]: https://lore.kernel.org/all/4hiTc8Kx5yNhYuN8abv3QFJBuptM6VWZ9OKvkdZFlSI5y0zoK-lN_VHf-QCSEjllmSWvu9V-tbrvFOx17_P0Nq8UKxEcK3Rs2d02FjbYuUc=@proton.me/#r\n-----BEGIN PGP SIGNATURE-----\nVersion: ProtonMail\n\nwnUEARYKACcFgmc7uf0JkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu\n8pkAABh9AQDQxbp7CHRFU0poLOuwPdICYc07bOUMHu/EXC4SweKiPAEA6fiT\nyPK2ueIqGYTPzGYtEHLxw7wsV8ZuXS7mE6HseAA=\n=/xm/\n-----END PGP SIGNATURE-----\n"}]}