lambdalisue / vim-gista

An alternative gist.vim, vim plugin which manipulate gists in Vim.
http://www.vim.org/scripts/script.php?script_id=4976
MIT License
156 stars 5 forks source link

Couldn't update a forked gist #73

Closed tyru closed 8 years ago

tyru commented 8 years ago

After I applied #71

I couldn't update a forked gist.

  1. :Gista fork ...
  2. :Gista list and open the forked gist
  3. :w

causes:

vim-gista: A remote content of a gist 18b30b3874522fc16595 in GitHub is modified from last access.
Use ":w!" to post changes to GitHub forcedly or :Gista post to create a new Gist
lambdalisue commented 8 years ago

As the message said, you need to use :w! for instance.

Gist API returns GUID to determine if the gist is updated or not for all API. vim-gista use that GUID to check if a remote gist is updated or not to reduce API use (to prevent API limit). However a GUID returned from any POST action (e.g. :Gista post or :Gista fork) will be differ from next GET request and that's why vim-gista assume that the remote content is modified (I think this is a kind bug of Gist API).

If I perform GET request after POST, it can be fixed but while requesting gist is time-consuming, I decided to leave this while user easily update the remote content with :w!.

tyru commented 8 years ago

OK, now I understand this is an expected behavior. Please feel free to ignore, too :) #72

lambdalisue commented 8 years ago

Thanks for understanding ;-)