| 4784 | } |
| 4785 | |
| 4786 | static int apply_save_autostash(const char *path, int attempt_apply) |
| 4787 | { |
| 4788 | struct strbuf stash_oid = STRBUF_INIT; |
| 4789 | int ret = 0; |
| 4790 | |
| 4791 | if (!read_oneliner(&stash_oid, path, |
| 4792 | READ_ONELINER_SKIP_IF_EMPTY)) { |
| 4793 | strbuf_release(&stash_oid); |
| 4794 | return 0; |
| 4795 | } |
| 4796 | strbuf_trim(&stash_oid); |
| 4797 | |
| 4798 | ret = apply_save_autostash_oid(stash_oid.buf, attempt_apply, |
| 4799 | NULL, NULL, NULL, NULL); |
| 4800 | |
| 4801 | unlink(path); |
| 4802 | strbuf_release(&stash_oid); |
| 4803 | return ret; |
| 4804 | } |
| 4805 | |
| 4806 | int save_autostash(const char *path) |
| 4807 | { |
no test coverage detected