)]}'
{
  "commit": "c52f085a477c8eece87821c5bbc035e5a900eb12",
  "tree": "bd2b0ad8411ba4daebb0cfc67792c3e942be1d45",
  "parents": [
    "7c02d39fc2ed2702223c7674f73150d9a7e61ba4"
  ],
  "author": {
    "name": "Shreyansh Paliwal",
    "email": "shreyanshpaliwalcmsmn@gmail.com",
    "time": "Sat Feb 28 16:50:45 2026 +0530"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Mar 02 08:09:16 2026 -0800"
  },
  "message": "send-email: validate charset name in 8bit encoding prompt\n\nWhen a non-ASCII character is detected in the body or subject of the email\nthe user is prompted with,\n\n        Which 8bit encoding should I declare [UTF-8]? foo\n\nAfter this the input string is validated by the regex, based on the fact\nthat the charset string will be minimum 4 characters [1]. If the string is\nmore than 4 letters the email is sent, if not then a second prompt to\nconfirm is asked to the user,\n\n        Are you sure you want to use \u003cfoo\u003e [y/N]? y\n\nThis relies on a length based regex heuristic check to validate the user\ninput, and can allow clearly invalid charset names to pass if the input is\ngreater than 4 characters.\n\nAdd a semantic validation of the charset name using the\nEncode::find_encoding() which is a bundled module of perl. If the encoding\nis not recognized, warn the user and ask for confirmation before proceeding.\nAfter this validation the lenght based validation becomes redundant and also\nbreaks flow, so change the regex of valid input to any non blank string.\n\nMake the encoding warning logic specific to the 8bit prompt, also add a\nunique confirmation prompt which  reduces the load on ask(), and improves\nmaintainability.\n\nAdditionally, the wording of the first prompt can confuse the user if not\nread properly or under any default assumptions for a yes/no prompt. Change\nthe wording to make it explicitly clear to the user that the prompt needs a\nstring input, UTF-8 being the default.\n\nThe intended flow is,\n\n        Declare which 8bit encoding to use [default: UTF-8]? foobar\n        \u0027foobar\u0027 does not appear to be a valid charset name. Use it anyway [y/N]?\n\n[1]- https://github.com/git/git/commit/852a15d748034eec87adbee73a72689c8936fb8b\n\nSigned-off-by: Shreyansh Paliwal \u003cshreyanshpaliwalcmsmn@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cd4b316ddc1ed1eba55eeff30baf8406ba0dcbcc",
      "old_mode": 33261,
      "old_path": "git-send-email.perl",
      "new_id": "318610470993efcefb6af644389989b51a3954a1",
      "new_mode": 33261,
      "new_path": "git-send-email.perl"
    },
    {
      "type": "modify",
      "old_id": "e56e0c8d7770b070b706ef9b7c90b7945a0b3a3a",
      "old_mode": 33261,
      "old_path": "t/t9001-send-email.sh",
      "new_id": "24f6c76aeed5902d6e135e66c179eca2a867e012",
      "new_mode": 33261,
      "new_path": "t/t9001-send-email.sh"
    }
  ]
}
