Hey Everyone!

It’s almost time we fully implement --committer-date-is-author-date for rebase -i. For those who don’t know, this flag helps us “lie” about the committer date (making it equal to the author date).

## Implementation

Here is a flow chart showing the rough control flow of what happens when we run “git rebase -i <args>” or “git rebase --continue”.

flow chart showing control flow

Both the commands (after executing “epilogue”) calls sequencer_continue which can be thought of as the driver function. As it is clear from the chart, in the end, all of the functions call either commit_tree_extended or run_git_commit. Both of them checks for GIT_COMMITTER_DATE env variable to set the committer date. We can easily read the author date from the author script which is saved under rebase_path_author_script() and set the committer date to the value read. The catch here is, this all works only when we do not allow fast-forwards, i.e., we force a rebase!

Also, I’ve not explored the part where we actually spawn an octopus merge to record a merge commit. I guess it also reads GIT_COMMITTER_DATE env variable somehow but we will only know for sure when we read the code ;)

Remember the “epilogue” I mentioned? It helps us sustain the --committer-date-is-author-date flag between interrupts. Something that am based rebase can’t do :P We are basically saving it as a file under the rebase_path() as rebase_path_cdate_is_adate() (subject to change) and checking if this path exists to set the flag.

I still need to work on the documentation and tests for this new flag. Let’s see, this flag will soon be a reality!

## Other Stuff

I was discussing with the mentors about my previous patch. It’s about time we send it to the mailing list. There are some final checks that need to be clear. I can already see it in the git/git tree :P

‘Till then!