git config user.name和user.email里的信息无法获取
Closed this issue · 5 comments
woshiwstt50123 commented
注意!很多问题都可以在配置字段查看所有配置中和issue里得到解决!
注意!很多问题都可以在配置字段查看所有配置中和issue里得到解决!
注意!很多问题都可以在配置字段查看所有配置中和issue里得到解决!
注意:
- 可以先试一下常见问题中的方法.
- 然后搜一搜以前关闭的issue看有没有相似的问题可以帮助解决问题。
- 打开
fileheader.configObj.showErrorMessage
看看没有没有报错信息 - issue提的越清晰,越容易定位问题/找到bug,越快速的解决问题。
注意!请一定要按照规范来提Issue,这样问题能更快的得到解决!
注意!请一定要按照规范来提Issue,这样问题能更快的得到解决!
注意!请一定要按照规范来提Issue,这样问题能更快的得到解决!
描述bug(必填)
一个清楚而简洁的bug描述。
git config user.name和user.email里的信息无法获取
注释设置(必填):
VsCode设置:
"fileheader.customMade": {
// Author字段是文件的创建者 可以在specialOptions中更改特殊属性
// 公司项目和个人项目可以配置不同的用户名与邮箱 搜索: gitconfig includeIf 比如: https://ayase.moe/2021/03/09/customized-git-config/
// 自动提取当前git config中的: 用户名、邮箱
"Author": "git config user.name && git config user.email", // 同时获取用户名与邮箱
// "Author": "git config user.name", // 仅获取用户名
// "Author": "git config user.email", // 仅获取邮箱
// "Author": "OBKoro1", // 写死的固定值 不从git config中获取
"Date": "Do not edit", // 文件创建时间(不变)
// LastEditors、LastEditTime、FilePath将会自动更新 如果觉得时间更新的太频繁可以使用throttleTime(默认为1分钟)配置更改更新时间。
"LastEditors": "唐韬 && tangtao@well_healthcare.com",
//"git config user.name && git config user.email", // 文件最后编辑者 与Author字段一致
// 由于编辑文件就会变更最后编辑时间,多人协作中合并的时候会导致merge
// 可以将时间颗粒度改为周、或者月,这样冲突就减少很多。搜索变更时间格式: dateFormat
"LastEditTime": "Do not edit", // 文件最后编辑时间
// 输出相对路径,类似: /文件夹名称/src/index.js
"FilePath": "Do not edit", // 文件在项目中的相对路径 自动更新
// 插件会自动将光标移动到Description选项中 方便输入 Description字段可以在specialOptions更改
"Description": "", // 介绍文件的作用、文件的入参、出参。
// custom_string_obkoro1~custom_string_obkoro100都可以输出自定义信息
// 可以设置多条自定义信息 设置个性签名、留下QQ、微信联系方式、输入空行等
"custom_string_obkoro1": "",
// 版权声明 保留文件所有权利 自动替换年份 获取git配置的用户名和邮箱
// 版权声明获取git配置, 与Author字段一致: ${git_name} ${git_email} ${git_name_email}
"custom_string_obkoro1_copyright":"Copyright (c) ${now_year} by ${git_name_email}, All Rights Reserved. "
// "Copyright (c) ${now_year} by ${git_name_email}, All Rights Reserved. "
// "custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by 写死的公司名/用户名, All Rights Reserved. "
},
// 函数注释
"fileheader.cursorMode": {
"description": "", // 函数注释生成之后,光标移动到这里
"param": "", // param 开启函数参数自动提取 需要将光标放在函数行或者函数上方的空白行
"return": "",
},
"fileheader.configObj": {
"createFileTime": true,
"language": {
"languagetest": {
"head": "/$$",
"middle": " $ @",
"end": " $/",
"functionSymbol": {
"head": "/** ",
"middle": " * @",
"end": " */"
},
"functionParams": "js"
},
"showErrorMessage":"open"
},
"autoAdd": true,
"autoAddLine": 100,
"autoAlready": true,
"annotationStr": {
"head": "/*",
"middle": " * @",
"end": " */",
"use": false
},
"headInsertLine": {
"php": 2,
"sh": 2
},
"beforeAnnotation": {
"文件后缀": "该文件后缀的头部注释之前添加某些内容"
},
"afterAnnotation": {
"文件后缀": "该文件后缀的头部注释之后添加某些内容"
},
"specialOptions": {
"特殊字段": "自定义比如LastEditTime/LastEditors"
},
"switch": {
"newlineAddAnnotation": true
},
"supportAutoLanguage": [],
"prohibitAutoAdd": [
"json"
],
"folderBlacklist": [
"node_modules",
"文件夹禁止自动添加头部注释"
],
"prohibitItemAutoAdd": [
"项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
],
"moveCursor": true,
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"atSymbol": [
"@",
"@"
],
"atSymbolObj": {
"文件后缀": [
"头部注释@符号",
"函数注释@符号"
]
},
"colon": [
": ",
": "
],
"colonObj": {
"文件后缀": [
"头部注释冒号",
"函数注释冒号"
]
},
"filePathColon": "路径分隔符替换",
"showErrorMessage": false,
"writeLog": false,
"wideSame": false,
"wideNum": 13,
"functionWideNum": 0,
"CheckFileChange": false,
"createHeader": false,
"useWorker": false,
"designAddHead": false,
"headDesignName": "random",
"headDesign": false,
"cursorModeInternalAll": {},
"openFunctionParamsCheck": true,
"functionParamsShape": [
"{",
"}"
],
"functionBlankSpaceAll": {},
"functionTypeSymbol": "*",
"typeParamOrder": "type param",
"customHasHeadEnd": {},
"throttleTime": 60000,
"functionParamAddStr": "",
"NoMatchParams": "no show param"
},
文件后缀(必填):
如:test.js 的后缀为 js
你得到的注释(必填):
你生成的注释为:
// 注释贴在这里面
/*
* @Author: error: git config user.name && git config user.email & please set dead value or install git
* @Date: 2022-08-26 11:32:50
* @LastEditors: 唐韬 && tangtao@well_healthcare.com
* @LastEditTime: 2022-08-26 14:43:03
* @FilePath: \HXModuleV0.1.0-V1.0_20220224\count.h
* @Description:
*
* Copyright (c) 2022 by error: git config user.name && git config user.email & please set dead value or install git, All Rights Reserved.
*/
也可以贴上截图:
预期的行为(必填):
预期得到的注释/行为:
// 预期行为的注释贴在这里
/*
* @Author: error: Tang Tao && tangtao@well_healthcare.com
* @Date: 2022-08-26 11:32:50
* @LastEditors: 唐韬 && tangtao@well_healthcare.com
* @LastEditTime: 2022-08-26 14:43:03
* @FilePath: \HXModuleV0.1.0-V1.0_20220224\count.h
* @Description:
*
* Copyright (c) 2022 by Tang Tao && tangtao@well_healthcare.com, All Rights Reserved.
*/
也可以贴上截图:
屏幕截图(选填)
问题相关(选填)
在这里添加关于这个问题的任何其他上下文。
错误日志(选填):
woshiwstt50123 commented
文件后缀是.h
Luvisdaisy commented
请问解决了吗,我也遇到了同样的问题
文件后缀是.h
OBKoro1 commented
@woshiwstt50123 报错里面提示,你需要安装git或者需要设置一个值,你需要先确保自己能读取到git config user.name
、git config user.email
PoplarZhu commented
斯哈 这个问题解决了吗
PoplarZhu commented