From 3357cf5f71452971d710a3d506acc004c3ed8811 Mon Sep 17 00:00:00 2001 From: Kris <1611248+Rinzwind@users.noreply.github.com> Date: Tue, 8 Jul 2025 17:15:24 +0200 Subject: [PATCH] =?UTF-8?q?Applied=20changes=20from=20pull=20request=20#98?= =?UTF-8?q?=20(=E2=80=9CAdd=20support=20for=20using=20=E2=80=98git=5Fstash?= =?UTF-8?q?=5Fsave=E2=80=99=E2=80=9D)=20to=20Pharo=2012.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../instance/stash.signature.flags..st | 9 +++++++++ .../instance/stash_save.signature.message.flags..st | 6 ++++++ .../LGitStashFlagsEnum.class/README.md | 0 .../LGitStashFlagsEnum.class/class/enumDecl.st | 9 +++++++++ .../class/git_stash_default.st | 5 +++++ .../class/git_stash_include_ignored.st | 5 +++++ .../class/git_stash_include_untracked.st | 5 +++++ .../class/git_stash_keep_all.st | 5 +++++ .../class/git_stash_keep_index.st | 5 +++++ .../LGitStashFlagsEnum.class/properties.json | 11 +++++++++++ 10 files changed, 60 insertions(+) create mode 100644 LibGit-Core.package/LGitRepository.class/instance/stash.signature.flags..st create mode 100644 LibGit-Core.package/LGitRepository.class/instance/stash_save.signature.message.flags..st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/README.md create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/enumDecl.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_default.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_ignored.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_untracked.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_all.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_index.st create mode 100644 LibGit-Core.package/LGitStashFlagsEnum.class/properties.json diff --git a/LibGit-Core.package/LGitRepository.class/instance/stash.signature.flags..st b/LibGit-Core.package/LGitRepository.class/instance/stash.signature.flags..st new file mode 100644 index 00000000..b82b1de9 --- /dev/null +++ b/LibGit-Core.package/LGitRepository.class/instance/stash.signature.flags..st @@ -0,0 +1,9 @@ +operations +stash: message signature: signature flags: flags + + | stash | + + stash := LGitId new. + self withReturnHandlerDo: [ + self stash_save: stash signature: signature message: message flags: flags ]. + ^ stash \ No newline at end of file diff --git a/LibGit-Core.package/LGitRepository.class/instance/stash_save.signature.message.flags..st b/LibGit-Core.package/LGitRepository.class/instance/stash_save.signature.message.flags..st new file mode 100644 index 00000000..313abfd8 --- /dev/null +++ b/LibGit-Core.package/LGitRepository.class/instance/stash_save.signature.message.flags..st @@ -0,0 +1,6 @@ +libgit - calls +stash_save: id signature: signature message: message flags: flags + + ^ self + ffiCallSafely: #(LGitReturnCodeEnum git_stash_save(LGitId * id, self, LGitSignature * signature, String message, LGitStashFlagsEnum flags)) + options: #() \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/README.md b/LibGit-Core.package/LGitStashFlagsEnum.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/enumDecl.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/enumDecl.st new file mode 100644 index 00000000..d5f822e0 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/enumDecl.st @@ -0,0 +1,9 @@ +enum declaration +enumDecl + + ^ #( + GIT_STASH_DEFAULT 0 + GIT_STASH_KEEP_INDEX 1 + GIT_STASH_INCLUDE_UNTRACKED 2 + GIT_STASH_INCLUDE_IGNORED 4 + GIT_STASH_KEEP_ALL 8 ) \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_default.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_default.st new file mode 100644 index 00000000..fa02bac0 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_default.st @@ -0,0 +1,5 @@ +accessing - values +git_stash_default + ^ self basicNew + value: 0; + yourself \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_ignored.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_ignored.st new file mode 100644 index 00000000..d1693772 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_ignored.st @@ -0,0 +1,5 @@ +accessing - values +git_stash_include_ignored + ^ self basicNew + value: 4; + yourself \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_untracked.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_untracked.st new file mode 100644 index 00000000..c70484c2 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_include_untracked.st @@ -0,0 +1,5 @@ +accessing - values +git_stash_include_untracked + ^ self basicNew + value: 2; + yourself \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_all.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_all.st new file mode 100644 index 00000000..07800749 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_all.st @@ -0,0 +1,5 @@ +accessing - values +git_stash_keep_all + ^ self basicNew + value: 8; + yourself \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_index.st b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_index.st new file mode 100644 index 00000000..204fc1a5 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/class/git_stash_keep_index.st @@ -0,0 +1,5 @@ +accessing - values +git_stash_keep_index + ^ self basicNew + value: 1; + yourself \ No newline at end of file diff --git a/LibGit-Core.package/LGitStashFlagsEnum.class/properties.json b/LibGit-Core.package/LGitStashFlagsEnum.class/properties.json new file mode 100644 index 00000000..043b3348 --- /dev/null +++ b/LibGit-Core.package/LGitStashFlagsEnum.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "LGitExternalEnumerationUInt32", + "category" : "LibGit-Core-FFI-Enums", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "LGitStashFlagsEnum", + "type" : "normal" +} \ No newline at end of file