public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] lib/oe/patch: use author date as commit date for "git am"
@ 2025-12-02  4:32 'Cedric Hombourger' via isar-users
  0 siblings, 0 replies; 2+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-12-02  4:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: isar-users, Cedric Hombourger

By default, "git am" uses the time of commit creation as the committer
date and is therefore "unique" to each build.

Use the --committer-date-is-author-date option for git to use the author
date as the committer date to get deterministic meta-data and therefore
commit hashes (which may end-up in sources or build in the form of e.g.
localversion file).

Cc: isar-users@googlegroups.com
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/lib/oe/patch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 77b166cfa3..246fc6221f 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -626,7 +626,8 @@ class GitApplyTree(PatchTree):
             try:
                 shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot]
                 self.gitCommandUserOptions(shellcmd, self.commituser, self.commitemail)
-                shellcmd += ["am", "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
+                shellcmd += ["am", "--committer-date-is-author-date",
+                             "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
                 return _applypatchhelper(shellcmd, patch, force, reverse, run)
             except CmdError:
                 # Need to abort the git am, or we'll still be within it at the end
-- 
2.47.3

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251202043207.1353655-1-cedric.hombourger%40siemens.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] lib/oe/patch: use author date as commit date for "git am"
@ 2025-12-02  9:15 'Cedric Hombourger' via isar-users
  0 siblings, 0 replies; 2+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-12-02  9:15 UTC (permalink / raw)
  To: openembedded-core; +Cc: Cedric Hombourger, isar-users

By default, "git am" uses the time of commit creation as the committer
date and is therefore "unique" to each build.

Use the --committer-date-is-author-date option for git to use the author
date as the committer date to get deterministic meta-data and therefore
commit hashes (which may end-up in sources or build in the form of e.g.
localversion file).

Cc: isar-users@googlegroups.com
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/lib/oe/patch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 77b166cfa3..246fc6221f 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -626,7 +626,8 @@ class GitApplyTree(PatchTree):
             try:
                 shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot]
                 self.gitCommandUserOptions(shellcmd, self.commituser, self.commitemail)
-                shellcmd += ["am", "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
+                shellcmd += ["am", "--committer-date-is-author-date",
+                             "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
                 return _applypatchhelper(shellcmd, patch, force, reverse, run)
             except CmdError:
                 # Need to abort the git am, or we'll still be within it at the end
-- 
2.47.3

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251202091553.1420049-1-cedric.hombourger%40siemens.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-02  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-02  4:32 [PATCH] lib/oe/patch: use author date as commit date for "git am" 'Cedric Hombourger' via isar-users
2025-12-02  9:15 'Cedric Hombourger' via isar-users

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox