Re: [PATCH 3/3] rebase: add options passed to git-am

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/3] rebase: add options passed to git-am

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:25

Michele Ballabio [off-list ref] writes:
Add the options --committer-date-is-author-date and --ignore-date
to git-rebase. They were introduced in commit a79ec62d0 for git-am.

Signed-off-by: Michele Ballabio <redacted>
---

I'm not sure if force_rebase should be set in this case.
Good thinking.

These are clearly "I want to change these commit" request just like
the "--whitespace=fix" option is, so I think it is probably a good idea.

[PATCH v2 3/3] rebase: add options passed to git-am

From: Michele Ballabio <hidden>
Date: 2016-06-15 22:46:25

Add the options --committer-date-is-author-date and --ignore-date
to git-rebase. They were introduced in commit a79ec62d0 for git-am.
These options imply --force-rebase.

Signed-off-by: Michele Ballabio <redacted>
---
 Documentation/git-rebase.txt |    5 +++++
 git-rebase.sh                |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 276f151..3d5a066 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -270,6 +270,11 @@ OPTIONS
 	(see linkgit:git-apply[1]) that applies the patch.
 	Incompatible with the --interactive option.
 
+--committer-date-is-author-date::
+--ignore-date::
+	These flags are passed to 'git-am' to easily change the dates
+	of the rebased commits (see linkgit:git-am[1]).
+
 -i::
 --interactive::
 	Make a list of the commits which are about to be rebased.  Let the
diff --git a/git-rebase.sh b/git-rebase.sh
index e38d68a..b83fd3f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -309,6 +309,10 @@ do
 			;;
 		esac
 		;;
+	--committer-date-is-author-date|--ignore-date)
+		git_am_opt="$git_am_opt $1"
+		force_rebase=t
+		;;
 	-C*)
 		git_am_opt="$git_am_opt $1"
 		;;
-- 
1.6.2.22.gc2ac
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help