Re: git rebase -i without altering the committer date

3 messages, 3 authors, 2016-06-16 · open the first message on its own page

Re: git rebase -i without altering the committer date

From: Andreas Schwab <hidden>
Date: 2016-06-16 02:18:53

Shaun Jackman [off-list ref] writes:
I'd like to insert a commit between two commits without changing the committer date or author date of that commit or the subsequent commits. I'd planned on using `git rebase -i` to insert the commit. I believe it retains the author date, but changes the committer date to the current time. I've seen the options `--committer-date-is-author-date` and `--ignore-date`, but I don't believe either of those options does what I want. If no such option currently exists to leave the committer and author date unchanged, is there any chance that this functionality could please be implemented?
The easiest way to implement that is to add a graft to redirect the
parent of the second commit to the inserted commit, then use git
filter-branch to make the graft permanent.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: git rebase -i without altering the committer date

From: Johannes Sixt <hidden>
Date: 2016-06-16 02:18:53

Am 20.04.2016 um 23:47 schrieb Andreas Schwab:
Shaun Jackman [off-list ref] writes:
quoted
I'd like to insert a commit between two commits without changing
the committer date or author date of that commit or the subsequent
commits.
The easiest way to implement that is to add a graft to redirect the
parent of the second commit to the inserted commit, then use git
filter-branch to make the graft permanent.
This only inserts a new project state, but does not propagate the 
changes brought in by the new commit to the subsequent commits. This 
propagation of changes could also be done with filter-branch, but it may 
be difficult depending on circumstances.

-- Hannes

Re: git rebase -i without altering the committer date

From: Johannes Schindelin <hidden>
Date: 2016-06-16 02:18:53

Hi,

On Thu, 21 Apr 2016, Johannes Sixt wrote:
Am 20.04.2016 um 23:47 schrieb Andreas Schwab:
quoted
Shaun Jackman [off-list ref] writes:
quoted
I'd like to insert a commit between two commits without changing
the committer date or author date of that commit or the subsequent
commits.
The easiest way to implement that is to add a graft to redirect the
parent of the second commit to the inserted commit, then use git
filter-branch to make the graft permanent.
This only inserts a new project state, but does not propagate the changes
brought in by the new commit to the subsequent commits. This propagation of
changes could also be done with filter-branch, but it may be difficult
depending on circumstances.
I agree that rebase -i is the wrong wrench for this job. Either use
filter-branch or fast-export/edit/fast-import.

Or take a step back and ask yourself why you need to fool anybody about
the commit date... ;-D

Ciao,
Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help