git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC][PATCH v2 2/2] rebase -i: support --committer-date-is-author-date

From
Rohit Ashiwal <rohit.ashiwal265@gmail.com>
Date
Aug 2, 2019, 20:57 UTC
Message-ID
<20190802205731.13794-1-rohit.ashiwal265@gmail.com>
In-Reply-To
<xmqqwogdtzxc.fsf@gitster-ct.c.googlers.com>
Hi Junio
On Fri, 19 Jul 2019 15:36:15 -0700 Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>
> [...]
> Hmph, are we sure that author-script is always available at this
> point so that a call to read_author_date_or_die() is safe?  There
> are three callers to the run_git_commit() function and I am not sure
> if codepaths that reach all of them prepared the input to the
> read_author_script() helper.

Functions do_pick_commit() and do_merge() always write author_script before calling run_git_commit(), so, we are sure to find it on disk. Furthermore, commit_staged_changes() only calls run_git_commit() when rebase is stopped (by merge conflicts or 'edit' commands), so we are sure that the previous invocation of git must have saved author_script. In all other cases, we fail as we should.

Show 9 quoted lines
> [...]
>
> In the same function, we seem to be grabbing the author ident by
> calling get_author(message), where the message is an in-core copy of
> a commit object, which suggests me that we may not necessarily be
> working with the on-disk information read_author_date_or_die() is
> prepared to deal with.  Are we sure we have the needed information
> on disk so that read_author_date_or_die() will read the correct
> information from the disk?

Yes, in that case, we can re-parse the author date and re-set the env variable while we are in this if branch. I believe that the information stored on the disk is same as the information retrieved through get_author(), please confirm or disprove this.

> [...]
With all this knowledge, I'll polish the patch and re-send it.

Thanks Rohit

Previous: Junio C HamanoNext: Phillip Wood
Message 12 of 32 in “rebase -i: support --ignore-whitespace”
  1. Rohit AshiwalJul 12, 2019
  2. [GSoC][PATCH 1/1] rebase -i: add --ignore-whitespace flagRohit Ashiwal, Jul 12, 2019
  3. Junio C HamanoJul 15, 2019
  4. Rohit AshiwalJul 15, 2019
  5. Junio C HamanoJul 15, 2019
  6. Rohit AshiwalJul 15, 2019
  7. [GSoC][PATCH 0/2] rebase -i: support --committer-date-is-author-dateRohit Ashiwal, Jul 12, 2019
  8. [GSoC][PATCH v2 0/2] rebase -i: support --committer-date-is-author-dateRohit Ashiwal, Jul 18, 2019
  9. [GSoC][PATCH v2 1/2] sequencer: add NULL checks under read_author_scriptRohit Ashiwal, Jul 18, 2019
  10. [GSoC][PATCH v2 2/2] rebase -i: support --committer-date-is-author-dateRohit Ashiwal, Jul 18, 2019
  11. Junio C HamanoJul 19, 2019
  12. Rohit AshiwalAug 2, 2019
  13. Phillip WoodJul 20, 2019
  14. Rohit AshiwalJul 23, 2019
  15. Phillip WoodJul 24, 2019
  16. Junio C HamanoJul 19, 2019
  17. Junio C HamanoJul 19, 2019
  18. [GSoC][PATCH 1/2] sequencer: add NULL checks under read_author_scriptRohit Ashiwal, Jul 12, 2019
  19. Junio C HamanoJul 15, 2019
  20. [GSoC][PATCH 2/2] rebase -i: support --committer-date-is-author-dateRohit Ashiwal, Jul 12, 2019
  21. Rohit AshiwalJul 14, 2019
  22. [GSoC][PATCH v2 0/1] rebase -i: support --ignore-whitespaceRohit Ashiwal, Jul 18, 2019
  23. [GSoC][PATCH v2 1/1] rebase -i: add --ignore-whitespace flagRohit Ashiwal, Jul 18, 2019
  24. Junio C HamanoJul 19, 2019
  25. Rohit AshiwalJul 23, 2019
  26. Junio C HamanoJul 23, 2019
  27. Phillip WoodJul 22, 2019
  28. Rohit AshiwalJul 23, 2019
  29. Elijah NewrenJul 23, 2019
  30. Johannes SchindelinJul 24, 2019
  31. [GSoC][PATCH v3 0/1] rebase -i: add --ignore-whitespace flagRohit Ashiwal, Jul 24, 2019
  32. [GSoC][PATCH v3 1/1] rebase -i: add --ignore-whitespace flagRohit Ashiwal, Jul 24, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.