Closed scott2000 closed 3 hours ago
It might be okay for
jj commit
to always reset author (or timestamp at least.) Is that surprising?
I think this might be surprising, since as @PhilipMetzger said, I tend to think of jj commit
as being the same as jj describe
followed by jj new
, and I don't think describe
should update the author information. If we do change it, it might be good to have it be opt-in through a config option.
Are there any existing cases where the behavior is different for commit
compared to desc + new
?
Are there any existing cases where the behavior is different for
commit
compared todesc + new
?
No, I don't think so (except for splitting.)
I just thought it might make sense to people coming from other VCSs if commit
updated author timestamp. I don't have strong feeling about that.
I just thought it might make sense to people coming from other VCSs if
commit
updated author timestamp. I don't have strong feeling about that.
Yeah, it does seem like it would better match the expectations of new users coming from Git. One concern I have is that new users might also use jj split
to replicate git commit -p
and then be confused why it doesn't behave the same as jj commit
.
If we update jj commit
, we could also update jj split
to reset the author on the first commit, but I'm not sure whether that would be surprising when splitting commits other than @
, since semantically the second commit might be the "new" one.
I'm curious how many Git users actually know that there's separate author and committer timestamps. It could be the case that most people don't even know/care how it works in Git, in which case it wouldn't matter that jj behaves differently.
I just thought it might make sense to people coming from other VCSs if
commit
updated author timestamp. I don't have strong feeling about that.Yeah, it does seem like it would better match the expectations of new users coming from Git. One concern I have is that new users might also use
jj split
to replicategit commit -p
and then be confused why it doesn't behave the same asjj commit
.
Let's not change the meaning of commit
to perfectly match Git, there's no reason to as Jujutsu is a separate system.
One concern I have is that new users might also use
jj split
to replicategit commit -p
and then be confused why it doesn't behave the same asjj commit
.
I wouldn't consider jj split
as a command to finish up the first commit, so I wouldn't expect it to update author timestamp. However, I see your point.
I'm curious how many Git users actually know that there's separate author and committer timestamps. It could be the case that most people don't even know/care how it works in Git, in which case it wouldn't matter that jj behaves differently.
My anecdotal experience is that most Git users barely think about timestamps at all.
Since
jj describe --reset-author
works, I also expectedjj commit --reset-author
to work, so I think this would be a good option to add.Checklist
If applicable:
CHANGELOG.md