-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update isn't a fast forward #21
Comments
fun fact, with |
Can you add a code sample exhibiting the problem? I did the following on http://philschatz.com/octokit.js/demo/ and was able to run it without problems (you can paste all lines at once):
and verified by running |
try a |
I tested using:
and looking at the network tab we see the same thing; the second write leads to
and the file on the repo contains "aloha" rather than "aloha2" |
That indeed does not work. I'm guessing GitHub has a delay in updating their caches. If you are updating multiple files you should use
|
oh interesting. how does .then differ from .done in this use? I rewrote the .done to .then, but the effect's still the same. I suppose I can just stick in a several second timeout, but not the most ideal (definitely works though, a 2 second delay certainly works) Also, one route is two writes, however, the other route is a remove and write, so unless writeMany can do simultaneous write/removes, this might still be a problem. |
RE https://github.com/Pomax/gh-blog/blob/gh-pages/gh-weblog/js/administration.js#L137:
|
true, it's not ideal, although for my specific use case it'll do the trick for now; the .then() construction seems to kick in too early. That said, with timeout it works quite brilliantly and I now finally have a blog system that's a single click, then typing markdown =) Thank you very much for this library. |
Currently, Thanks for using In any case, closing the issue unless you have a reason to reopen it. |
I'm writing a new file to my repo, and afterward updating an existing file, using the
.done
handler. However, while the new file gets written without issue, the update throws the following API error:According to the indicated link, there's a way to force the update (I love forcing updates!) but the real question is why this update isn't considered a fast-forward update =/
The text was updated successfully, but these errors were encountered: