Skip to content

Implement Stash API. #871

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

Closed
wants to merge 6 commits into from
Closed

Implement Stash API. #871

wants to merge 6 commits into from

Conversation

Therzok
Copy link
Member

@Therzok Therzok commented Nov 14, 2014

Based on libgit2/libgit2#2705

Not in master yet, adding so I can test locally.

@@ -1328,6 +1330,12 @@ private static bool IsRunningOnLinux()
[DllImport(libgit2)]
internal static extern int git_stash_drop(RepositorySafeHandle repo, UIntPtr index);

[DllImport(libgit2)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZOMG! tabs! :trollface:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know. I did it as fast as possible without caring what's going on. :P

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😉

@vbjay
Copy link

vbjay commented Dec 3, 2014

@Therzok
Copy link
Member Author

Therzok commented Dec 3, 2014

@vbjay I do my work in XS and it has auto-format on save, I just didn't do it in an IDE this time (vimmed my way through it since I was ssh'ing to my machine from college when this PR happened).

@vbjay
Copy link

vbjay commented Dec 3, 2014

Oh the fun with vim. :)

On Wed Dec 03 2014 at 11:33:17 AM Marius Ungureanu [email protected]
wrote:

@vbjay https://github.com/vbjay I do my work in XS and it has
auto-format on save, I just didn't do it in an IDE this time (vimmed my way
through it since I was ssh'ing to my machine from college when this PR
happened).


Reply to this email directly or view it on GitHub
#871 (comment).

@txdv
Copy link
Contributor

txdv commented Dec 4, 2014

Use "Show invisible chars"

@Therzok
Copy link
Member Author

Therzok commented Dec 13, 2014

Hey guys, I really mentioned "I wanted a quick patch" to test. I opened the PR on API discussion. I'll fix the PR up after the libgit2 PR is merged, since there's no worth in overworking if that PR is dropped or the API changes. 🐰

@nulltoken
Copy link
Member

@Therzok spaces are a serious matter. That shouldn't be underestimated. Ever :trollface:

@Therzok
Copy link
Member Author

Therzok commented Apr 5, 2015

Okay, I'm advancing on this thing.

I got a few issues I have to point out.

  • This won't build on travis until we have that PR merged into upstream.
  • Stash apply libgit2#3018 (comment) - I'm testing this specific behavior.
  • Conflicts don't appear in the index for some reason. I'm an idiot who can't read docs x100.
  • Test coverage is horrible. 💃

@Therzok
Copy link
Member Author

Therzok commented Apr 5, 2015

I'm also experiencing some weird behaviour:

  • If I use ReinstateIndex, I get the new changes in the workdir.
  • Something screwed up (I updated GitCheckoutOpts, I probably missed something else?) I'm getting Invalid version 2049 on git_checkout_options).
  • No intermediary updates. :D

@Therzok Therzok force-pushed the therzok/stashApply branch from 3b8a9a7 to 0176b96 Compare April 6, 2015 15:21
@Therzok Therzok changed the title [DO NOT MERGE] Implement Stash API. [WIP] Implement Stash API. Apr 6, 2015
@Therzok Therzok changed the title [WIP] Implement Stash API. Implement Stash API. Apr 6, 2015
/// <param name="index">the index of the stash to remove (0 being the most recent one).</param>
/// <param name="options">the options to use for checking out the stash.</param>
/// <param name="flags">the flags to use for applying the changes.</param>
public virtual StashApplyStatus Apply(int index, StashApplyModifiers flags = StashApplyModifiers.Default, CheckoutOptions options = null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this could be abstracted in a StashApplyOptions.

class StashApplyOptions
{
    StashApplyModifiers flags;
    CheckoutOptions checkoutOptions;
}

/cc @nulltoken

@Therzok Therzok closed this Jun 3, 2015
@Therzok Therzok deleted the therzok/stashApply branch June 3, 2015 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants