Re: [PATCH v2 4/5] rebase -i: support --ignore-date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

>>> @@ -957,7 +976,11 @@ static int run_git_commit(struct repository *r,
>>>     	if (opts->committer_date_is_author_date)
>>>   		argv_array_pushf(&cmd.env_array, "GIT_COMMITTER_DATE=%s",
>>> +				 opts->ignore_date ?
>>> +				 "" :
>>>   				 author_date_from_env_array(&cmd.env_array));
>>> +	if (opts->ignore_date)
>>> +		argv_array_push(&cmd.env_array, "GIT_AUTHOR_DATE=");
>>>   
>>
>> Perhaps this could be done in read_env_script(), too, instead of fixing
>> up what this function did right after calling it, twice?  Something like
>> this:
>
> Long term I'd like to stop writing the author-script file unless we're
> stopping for a conflict resolution or edit so I'm reluctant to add
> more functionality to it at the moment. Also I tend to view
> read_env_script() it as loading the author details from a file rather
> than setting up the environment for the commit.

Yeah, the author-script, once the program halts and returns the
control to the human-user sitting on the terminal, can be peeked at,
and it should record what the program learned from the commit; it
smells like a premature optimization to rewrite it to what the
program plans to use to replay the commit and lose the information
taken from the original.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux