-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn user about the working copy when configuring the author #4130
Conversation
80a61ec
to
1628252
Compare
It's not clear to me how I should approach this. I noticed there's a |
I personally don't think this is good idea, but if needed, it's probably easier to implement as global flags. (See how |
I would argue that that's not a clean solution, either, since those flags are only needed for |
I'm not sure why it's needed for (and should be restricted to) |
16add06
to
a84113c
Compare
2345152
to
baa308c
Compare
Tested with following snippets that it works: Testing snippet❯ JJ_USER=user1 JJ_EMAIL=email1 jj git init .
Initialized repo in "."
❯ jj log
@ smytynvq email1 2024-08-06 21:11:21 303fc106
│ (empty) (no description set)
◆ zzzzzzzz root() 00000000
❯ jj config set --repo user.email "email2"
Warning: This setting will only impact future commits.
The author of the working copy will stay "user1 <email1>".
To change it, use "jj describe --reset-author --no-edit"
❯ jj log
@ smytynvq email1 2024-08-06 21:11:21 303fc106
│ (empty) (no description set)
◆ zzzzzzzz root() 00000000
❯ jj describe --reset-author --no-edit
Working copy now at: smytynvq 1f2c39c8 (empty) (no description set)
Parent commit : zzzzzzzz 00000000 (empty) (no description set)
❯ jj log
@ smytynvq email2 2024-08-06 21:12:08 1f2c39c8
│ (empty) (no description set)
◆ zzzzzzzz root() 00000000
❯ echo 'a' > a; jj commit -m 'a'; jj log
Working copy now at: xywsopol 5973def1 (empty) (no description set)
Parent commit : smytynvq 92a5caae a
@ xywsopol email2 2024-08-06 21:12:45 5973def1
│ (empty) (no description set)
○ smytynvq email2 2024-08-06 21:12:45 92a5caae
│ a
◆ zzzzzzzz root() 00000000
❯ jj config set --repo user.email "[email protected]"
Warning: This setting will only impact future commits.
The author of the working copy will stay "InCogNiTo124 <email2>".
To change it, use "jj describe --reset-author --no-edit"
❯ jj describe --no-edit --reset-author 'author("email2")'; jj log
Updated 2 commits
Working copy now at: xywsopol cbae64d7 (empty) (no description set)
Parent commit : smytynvq c8442055 a
@ xywsopol [email protected] 2024-08-06 21:13:53 cbae64d7
│ (empty) (no description set)
○ smytynvq [email protected] 2024-08-06 21:13:53 c8442055
│ a
◆ zzzzzzzz root() 00000000 |
84a34ba
to
01197eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
497d19b
to
b8f73e8
Compare
c630816
to
5066d08
Compare
c0b3611
to
f095fec
Compare
03c0982
to
72e28f3
Compare
72e28f3
to
1f136be
Compare
@yuja I believe this can be merged |
Yes. Maybe you don't have a permission to merge the PR yet? cc @martinvonz |
Yes, that's correct. Sorry that I didn't realize :( |
Closes #4042
Checklist
If applicable:
CHANGELOG.md
TODO
AddDeprecatedjj git init
flags for user and emailmakeDeprecated, fixed by describe: allow updating the description of multiple commits #3828jj describe --no-edit
accept a revset