commitizen / commitizen/cz-cli

COMMIT_EDITMSG is not updated

未關閉
#643 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
17.5k
分支
566
平均合併
8 小時 16 分鐘
30 天內合併 PR
1

描述

Hello guys and thank you for a wonderful package!

I am experiencing some issues though if commiting from within a submodule directory.
```
(node:16959) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOTDIR: not a directory, open '/home/ubuntu/path/to/repository/submodule/.git/COMMIT_EDITMSG' [edited for bug report]
(node:16959) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

Nonetheless script is definitely right because hooks for submodules are located under `../.git/modules/submodule/hooks` and therefore `COMMIT_EDITMSG` file would never appear under `submodule/.git/COMMIT_EDITMSG` and `submodule/.git` is file, that's true as well ;)

I cannot give a time to resolve it by myself at the moment but will hopefully provide a solution somehow later as a contributor.

貢獻指南

開啟貢獻指南

研究方向

首先,在 Git 子模組中重現一次 commit,並追蹤 COMMIT_EDITMSG 的處理方式。比較失敗的路徑 submodule/.git/COMMIT_EDITMSG 與 ../.git/modules/submodule/hooks 下的 hooks 位置;當 commit 流程不再嘗試開啟無效路徑,並且能在沒有未處理 rejection 的情況下處理該操作時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, javascript
領域
cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。