{"record":{"id":"a27745ae6c3f4c37","repo":"siyuan-note/siyuan","slug":"name-is-required-a27745","errorCode":null,"errorMessage":"--name is required","messagePattern":"--name is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/cli/cmd/repo.go","lineNumber":131,"sourceCode":"\t\t\tfmt.Printf(\"[dry-run] Would tag snapshot %s with \\\"%s\\\"\\n\", id, name)\n\t\t\treturn nil\n\t\t}\n\n\t\tif err := model.TagSnapshot(id, name); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Println(\"ok\")\n\t\treturn nil\n\t},\n}\n\nvar repoUntagCmd = &cobra.Command{\n\tUse:   \"untag --name <name>\",\n\tShort: \"Remove a tag\",\n\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\tname, _ := cmd.Flags().GetString(\"name\")\n\t\tif name == \"\" {\n\t\t\treturn fmt.Errorf(\"--name is required\")\n\t\t}\n\n\t\tif dryRun {\n\t\t\tfmt.Printf(\"[dry-run] Would remove snapshot tag \\\"%s\\\"\\n\", name)\n\t\t\treturn nil\n\t\t}\n\n\t\tif err := model.RemoveTagSnapshot(name); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Println(\"ok\")\n\t\treturn nil\n\t},\n}\n\nvar repoCheckoutCmd = &cobra.Command{\n\tUse:   \"checkout --id <id>\",\n\tShort: \"Checkout (rollback to) a snapshot\",","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/cli/cmd/repo.go#L113-L149","documentation":"Returned by the `repo untag` subcommand when --name is empty. Removing a tag is keyed by the tag label, so a name is mandatory (there is no --id for untag).","triggerScenarios":"Running `repo untag` with no --name flag or `--name \"\"`, before model.RemoveTagSnapshot is called.","commonSituations":"Forgetting the flag, or assuming untag takes a snapshot ID instead of a tag name.","solutions":["Pass the tag label: `repo untag --name <tag>`.","List tags/snapshots first to confirm the exact tag string."],"exampleFix":"# before\nsiyuan repo untag\n# after\nsiyuan repo untag --name release-1.0","handlingStrategy":"validation","validationCode":"[ -n \"$TAG\" ] || { echo 'repo untag requires --name'; exit 1; }\nsiyuan repo untag --name \"$TAG\"","typeGuard":"n/a (CLI flag validation)","tryCatchPattern":"n/a","preventionTips":["Remember untag is keyed by tag name, not snapshot ID.","Confirm the exact tag string from your snapshot/tag listing before removing."],"tags":["cli","repo","validation","missing-argument"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}