/// <summary> /// Creates a stash with the specified message. /// </summary> /// <param name="stasher">The <see cref="Signature"/> of the user who stashes </param> /// <param name = "message">The message of the stash.</param> /// <param name = "options">A combination of <see cref="StashOptions"/> flags</param> /// <returns>the newly created <see cref="Stash"/></returns> public virtual Stash Add(Signature stasher, string message = null, StashOptions options = StashOptions.Default) { Ensure.ArgumentNotNull(stasher, "stasher"); string prettifiedMessage = Proxy.git_message_prettify(string.IsNullOrEmpty(message) ? string.Empty : message); ObjectId oid = Proxy.git_stash_save(repo.Handle, stasher, prettifiedMessage, options); // in case there is nothing to stash if (oid == null) { return(null); } return(new Stash(repo, oid, 0)); }
internal static extern int git_stash_save( out GitOid id, RepositorySafeHandle repo, SignatureSafeHandle stasher, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string message, StashOptions flags);
public virtual Stash Add(Signature stasher, string message = null, StashOptions options = StashOptions.Default) { return(Add(stasher, message, (StashModifiers)options)); }