Modified: trunk/Tools/ChangeLog (282403 => 282404)
--- trunk/Tools/ChangeLog 2021-09-14 19:59:52 UTC (rev 282403)
+++ trunk/Tools/ChangeLog 2021-09-14 20:06:15 UTC (rev 282404)
@@ -1,3 +1,15 @@
+2021-09-14 Jonathan Bedard <jbed...@apple.com>
+
+ [git-webkit] Reset author time when editing commits (Part 1)
+ https://bugs.webkit.org/show_bug.cgi?id=230224
+ <rdar://problem/83065417>
+
+ Reviewed by Stephanie Lewis.
+
+ * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Capture 'git commit date=now'.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+ (PullRequest.create_commit): Always reset commit date.
+
2021-09-14 Hoa Dinh <d...@apple.com>
Provide a way to update the commit message with an updated list of changed files/functions
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (282403 => 282404)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py 2021-09-14 19:59:52 UTC (rev 282403)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py 2021-09-14 20:06:15 UTC (rev 282404)
@@ -415,11 +415,11 @@
generator=lambda *args, **kwargs:
mocks.ProcessCompletion(returncode=0) if re.match(r'^[A-Za-z0-9-]+/[A-Za-z0-9/-]+$', args[2]) else mocks.ProcessCompletion(),
), mocks.Subprocess.Route(
- self.executable, 'commit',
+ self.executable, 'commit', '--date=now',
cwd=self.path,
generator=lambda *args, **kwargs: self.commit(amend=False),
), mocks.Subprocess.Route(
- self.executable, 'commit', '--amend',
+ self.executable, 'commit', '--date=now', '--amend',
cwd=self.path,
generator=lambda *args, **kwargs: self.commit(amend=True),
), mocks.Subprocess.Route(
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py (282403 => 282404)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py 2021-09-14 19:59:52 UTC (rev 282403)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py 2021-09-14 20:06:15 UTC (rev 282404)
@@ -75,7 +75,7 @@
sys.stderr.write('No modified files\n')
return 1
log.warning('Amending commit...' if has_commit else 'Creating commit...')
- if run([repository.executable(), 'commit'] + (['--amend'] if has_commit else []), cwd=repository.root_path).returncode:
+ if run([repository.executable(), 'commit', '--date=now'] + (['--amend'] if has_commit else []), cwd=repository.root_path).returncode:
sys.stderr.write('Failed to generate commit\n')
return 1