This message was deleted.
# bug-reports
s
This message was deleted.
d
i'm trying to look up what weird characters
^W
and
^u
are is
^W
a delete character? i forget
my hunch is when we read from a user prompt, we're getting some garbage characters in there for some reason from the CLI
google is being really unhelpful when i search for
"^W"
even in quotes
but i've seen this bug before when trying to edit some
read
input from bash, in general
i would prefer if our user input prompts used
readline
under the hood so you could get the nice vi/emacs bindings when editing the input and i wonder if that would clear up any weird terminal input bugs that can arise, like when you hit the
delete
key and it just inputs a
^W
style code instead
v
Yeah I tried to look on Google as well about those char and didn't find anytying meaningful 😅
The commit messages were written in vim: for one case a branch was created with
gt branch create
then amended with
git commit -a
and message written in vim. The PR was squashed and merged. I checked the "original" commit: it doesn't contain the non-printable character. However the trunk commit (created from the PR title) has it. So the character ended up in the PR title and because it was created with a
gt ss
we strongly suspect it's graphite but don't know for sure
arrow keys when entering the PR title? 🤔 I will ask!
d
The commit messages were written in vim: for one case a branch was created with
gt branch create
then amended with
git commit -a
and message written in vim.
and then when they did
gt ss
, did they just accept the commit's message as the PR title, as-is, without editing it?
e.g. the
git commit
message that was made in Vim just became the PR title, straight up?
also would there be a way to just dump the raw
git commit
message that produced the bad PR title into a
txt
file and share it? in case there are secret hidden characters or if
git
is doing something smart and hiding them?
and can you dump the raw commit message of the PR merge commit in the
main
branch, so i can see that weird character?
v
^ is usually use as short form of Ctrl, so ^W usually is Ctrl+W
d
yeah i just don't remember what that stands for
v
Do those people maybe use
nano
as editor usually? It e.g. uses
^U
as "Paste" action. Maybe they try to past with that, then recognize they are not within
nano
and use the proper paste action, already having typed the
^U
character?
d
ooh nice thought
v
I just noticed that the developer edited the commit title (trying to understand how) Here is the git log for the commit in the PR:
Copy code
git log -1 4972cf157a326f4b77b1cbda2b3b10557442cbcf                                    
commit 4972cf157a326f4b77b1cbda2b3b10557442cbcf
Author: XXXXXX
Date:   Tue May 23 10:48:14 2023 +0200

    Role names are singular
    
    Also, change XXXXX for consistency with other existing roles.
and here is the one in the trunk (so the squashed and merged PR), showing the non-printable character in the title (first line):
Copy code
git log -1 d2017b3                                                                                       
commit d2017b3f19476233f376b689d18c3cf28cc4fb27
Author: XXXXXXXX
Date:   Tue May 23 14:46:42 2023 +0200

    ^UMinor adjustments to role name (#38926)
    
    Role names are singular.
    Also, change XXXXX for consistency with other existing roles.
trying to understand with the dev what could have happened
d
hm, i wonder if it's in our request logs somewhere, from the
gt ss
action
i know they could also have edited PR title via the Github UI, or the Graphite UI
v
they edited using the cli, interesting point mentioned by the dev:
In traditional UNIX CLIs, ^U would mean "clear current line and restart" (but that would be swallowed by the line discipline in the tty driver and would not be seen by application code). Now I don't think I actually used that keypress (I wouldn't swear, but I don't think I did), but maybe there's something fishy with some component synthesizing it when replacing the default title with something else? (Or maybe I did use it and don't remember correctly).
In any case I think the specific use case of editing the default PR title in the context of a stack submit might well be narrowing towards the root cause.
Also ^W is "delete word left of cursor" Maybe those are included as characters in the readline?
v
Ah, right, ^U is the counterpart to ^K (former to delete from caret to start of line, latter from caret to end of line)
d
thanks, this is all good context! sometimes i find the shell gets in a weird state where these characters start creeping in (but other times they don't!) so i will try to reproduce
🙏 1