July 13th: it works again, so far.
July 12th: I have (again) some of my answers I cannot edit (others can edit them, but I cannot)
- "How to make git maintain a git.properties file containing select information"
- "Can we mount subdirectories of a named volume in docker?", July 2016
- "How do I reference an existing branch from an issue in GitHub?", Dec. 2022
- "Add livedoc-mocha to existing project", June 27th, 2023, two weeks ago!
July 10th, 11th: it works
From July 1st, up to July 10th: I have some answers I am unable to edit:
- "Unable to star/unstar a GitHub repo when using the GitHub API (GitHub App integration)", which I had to delete and recreate.(so you need 10K to see the deleted one)
- "push --force-with-lease by default", which I cannot delete and recreate.
- "Clerk and Svix web hooks not working with error: "src property must be a valid json object""
- "In git, is there a way to show untracked stashed files without applying the stash?"
- "Multiple defers vs deferred anonymous function"
- "Is there any way to make a draft pull request using git bash?"
- "Trying to sign commits on git using gpg on WSL, but does not work"
- "Updating pull request after review changes commit doesn't show up in the pull request" (I managed to edit it once, and then... no more edit possible)
- "Rules for special characters in GitHub repository name?"
- "Understanding git rev-list"
- "How Do I Use
GIT_CONFIG
Environment Variable" - "How to retrieve the right commit hash?"
- "Replicate IntelliJ merge commit details functionality in CLI + vanilla git"
- "Reconnect ClearCase view to its Stream" (from 2 days ago!?)
Basically, any answer older than a few days can no longer be edited.
In all cases, on multiple computer/browsers (Firefox/Chrome latest version, even through new session in incognito mode):
Even if I delete the content and enter a simple sentence, it fails.
Which means the issue might be in the original content I want to replace.
- the first answer did not include any obvious special characters
- the second answer included "Ævar Arnfjörð Bjarmason"
- the third has no special characters
In all instances, no matter how many times I submit an edit, or how long I wait between them, the result is the same: "An error occurred submitting the edit".
This is confirmed even from a Firefox in safe mode, with 0 plugins.
I see, when editing the second one:
{
"POST": {
"scheme": "https",
"host": "stackoverflow.com",
"filename": "/posts/43726130/edit-submit/d8870f64-105e-48ce-8708-a5e2eeccf9c3",
"remote": {
"Address": "10.196.48.246:8080"
}
}
}
Request:
is-current=true&post-text=%3E+I'm+worried+that+I+might+forget+about+this+nifty+feature+the+next+time+I+need+it.++%0D%0A%0D%0AGit+2.13+(Q2+2017)+explains+why+there+is+no+%22protection%22+against+this+push+option+being+forgotten%2C+because+even+if+you+*do+not*+forget+it+at+the+%60git+push%60+level%2C+it+might+still+be+ignored.++%0D%0A++%0D%0ASee+%5Bcommit+f17d642%5D(https%3A%2F%2Fgithub.com%2Fgit%2Fgit%2Fcommit%2Ff17d642d3b0fa64879d59b311e596949f2a1f6d2)+(19+Apr+2017)+by+%5B%C3%86var+Arnfj%C3%B6r%C3%B0+Bjarmason+(%60avar%60)%5D(https%3A%2F%2Fgithub.com%2Favar).++%0D%0A%3Csup%3E(Merged+by+%5BJunio+C+Hamano+--+%60gitster%60+--%5D(https%3A%2F%2Fgithub.com%2Fgitster)+in+%5Bcommit+46bdfa3%5D(https%3A%2F%2Fgithub.com%2Fgit%2Fgit%2Fcommit%2F46bdfa3975665aaa9b7383466b529354d117e14d)%2C+26+Apr+2017)%3C%2Fsup%3E++%0D%0A%0D%0A%3E+%23%23+%60push%60%3A+document+%26+test+%60--force-with-lease%60+with+multiple+remotes%0D%0A%3E%0D%0A%3E+Document+%26+test+for+cases+where+there+are+two+remotes+pointing+to+the+same+URL%2C+and+a+background+fetch+%26+subsequent+%60git+push+--force-with-lease%60+shouldn't+clobber+un-updated+references+we+haven't+fetched.%0D%0A%3E%0D%0A%3E+**Some+editors+like+Microsoft's+VSC+have+a+feature+to+auto-fetch+in+the+background%2C+this+bypasses+the+protections+offered+by+%60--force-with-lease%60+%26+%60--force-with-lease%3D%3Crefname%3E%60**%2C+as+noted+in+the+documentation+being+added+here.%0D%0A%0D%0ASo+the+%5Bdocumentation+for+%60git+push%60%5D%5B1%5D+now+includes%3A%0D%0A%0D%0A%3E+general+note+on+safety%3A+supplying+this+option+without+an+expected%0D%0Avalue%2C+i.e.+as+%60--force-with-lease%60+or+%60--force-with-lease%3D%3Crefname%3E%60%0D%0Ainteracts+very+badly+with+anything+that+implicitly+runs+%60git+fetch%60+on%0D%0Athe+remote+to+be+pushed+to+in+the+background%2C+e.g.+%60git+fetch+origin%60%0D%0Aon+your+repository+in+a+cronjob.%0D%0A%3E%0D%0A%3E+The+protection+it+offers+over+%60--force%60+is+ensuring+that+subsequent+changes+your+work+wasn't+based+on+aren't+clobbered%2C+but+this+is+trivially+defeated+if+some+background+process+is+updating+refs+in+the+background.+We+don't+have+anything+except+the+remote+tracking+info+to+go+by+as+a+heuristic+for+refs+you're+expected+to+have+seen+%26+are+willing+to+clobber.%0D%0A%3E%0D%0A%3E+If+your+editor+or+some+other+system+is+running+%60git+fetch%60+in+the%0D%0Abackground+for+you+a+way+to+mitigate+this+is+to+simply+set+up+another%0D%0Aremote%3A%0D%0A%3E+%60%60%60%0D%0A%3E+git+remote+add+origin-push+%24(git+config+remote.origin.url)%0D%0A%3E+git+fetch+origin-push%0D%0A%3E+%60%60%60%0D%0A%3E+Now+when+the+background+process+runs+%60git+fetch+origin%60+the+references%0D%0Aon+%60origin-push%60+won't+be+updated%2C+and+thus+commands+like%3A%0D%0A%3E+%60%60%60%0D%0A%3E+git+push+--force-with-lease+origin-push%0D%0A%3E+%60%60%60%0D%0A%3E+Will+fail+unless+you+manually+run+%60git+fetch+origin-push%60.++%0D%0AThis+method+is+of+course+entirely+defeated+by+something+that+runs+%60git+fetch+--all%60%2C+in+that+case+you'd+need+to+either+disable+it+or+do+something+more+tedious+like%3A%0D%0A%3E+%60%60%60%0D%0A%3E+git+fetch++++++++++++++%23+update+'master'+from+remote%0D%0A%3E+git+tag+base+master++++%23+mark+our+base+point%0D%0A%3E+git+rebase+-i+master+++%23+rewrite+some+commits%0D%0A%3E+git+push+--force-with-lease%3Dmaster%3Abase+master%3Amaster%0D%0A%3E+%60%60%60%0D%0A%3E+I.e.+create+a+%60base%60+tag+for+versions+of+the+upstream+code+that+you've+seen+and+are+willing+to+overwrite%2C+then+rewrite+history%2C+and+finally+force+push+changes+to+%60master%60+if+the+remote+version+is+still+at+%60base%60%2C+regardless+of+what+your+local+%60remotes%2Forigin%2Fmaster%60+has+been+updated+to+in+the+background.%0D%0A%0D%0A%0D%0A++%5B1%5D%3A+https%3A%2F%2Fgithub.com%2Fgit%2Fgit%2Fblob%2Ff17d642d3b0fa64879d59b311e596949f2a1f6d2%2FDocumentation%2Fgit-push.txt%23L221-L249&fkey=e9c8e83b24f18cf42c00e373ef80268c3ec0a208056f57d29f77d8ec432723e7&author=&edit-comment=format+answer
But the response is a 500, with the "Oops! Something Bad Happened!" HTML page!?
([HTTP/2 500 Internal Server Error 30154ms]
)
The draft POST
does work, though:
{
"POST": {
"scheme": "https",
"host": "stackoverflow.com",
"filename": "/posts/43726130/editor-heartbeat/edit",
"remote": {
"Address": "10.196.48.246:8080"
}
}
}
specific-answer
tag again.