nblockchain / conventions

MIT License
1 stars 10 forks source link

FileConventions: fix wrapLatestCommitMsg on Win OS #168

Closed knocte closed 9 months ago

knocte commented 9 months ago

Fixes https://github.com/nblockchain/conventions/issues/123

Mersho commented 9 months ago

@knocte I tried the script, but nothing changed.

knocte commented 9 months ago

Please try again, I overlooked something.

Mersho commented 9 months ago

Please try again, I overlooked something.

script is working now. 👍

Mersho commented 9 months ago

During the test, i found a bug:

Steps to reproduce:

  1. git commit -m "foo: testing
    >
    > This is a so long long long long long long long long long long long long long long long long long commmit" --allow-empty
  2. dotnet fsi .\scripts\wrapLatestCommitMsg.fsx

result:

YOou asked to na mbernadn cthh ew impo/sfti xrWercaepnStc rciopmtmOintW,i nbduotw sd
oYionugr  sbor awnocuhl di sm aakhee
aidt  oefm p'tayn.d rYeosu/ wciapn/ friexpWeraatp Sycoruirp tcOonmWmiannddo wwsi't hb y- -2a lcloow-empty, orm myiotus .c
a n 
(ruesmeo v"eg itth ep ucsohm"m itto entirely  pwuibtlhi s"hg iyto urre sleotc aHlE AcDo^m"m.i
ts)

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .vscode/
        package-lock.json

No changes

Error when running 'git commit --amend --message "foo: testing

This is a so long long long long long long long long long long
long long long long long long long commmit"'
Fsdk.Process+ProcessFailed: Exception of type 'Fsdk.Process+ProcessFailed' was thrown.
   at Fsdk.Process.ProcessResult.Unwrap(String errMsg)
   at Fsdk.Process.ProcessResult.UnwrapDefault()
   at <StartupCode$FSI_0005>.$FSI_0005.main@() in C:\Users\ASUS\source\repos\conventions\scripts\wrapLatestCommitMsg.fsx:line 60
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Stopped due to error
knocte commented 9 months ago

Your info is terribly confusing; first you say it works and later you report a bug? are you saying it works generally but not for this specific case? FFS please try to think of what people might think when reading your messages.

Mersho commented 9 months ago

Your info is terribly confusing; first you say it works and later you report a bug? are you saying it works generally but not for this specific case? FFS please try to think of what people might think when reading your messages.

it works. but the bug I reported occurs when a commit is empty.

knocte commented 9 months ago

That's more clear, please open a bug about that.