Skip to content

wrapLatestCommitMsg.fsx doesn't seem to work empty commits #169

@Mersho

Description

@Mersho

Steps to reproduce:

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
  1. 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

expected result:

If the commit is empty, the script should modify the commit message using the --allow-empty option.

OS: Windows
Branch: Master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions