Hi,
Le 30/07/2018 à 20:25, SZEDER Gábor a écrit :
>> diff --git a/sequencer.c b/sequencer.c
>> index 1c035ceec7..d257903db0 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>
>> +int write_basic_state(struct replay_opts *opts, const char *head_name,
>> + const char *onto, const char *orig_head)
>> +{
>> + const char *quiet = getenv("GIT_QUIET");
>> +
>> + if (head_name)
>> + write_file(rebase_path_head_name(), "%s\n", head_name);
>> + if (onto)
>> + write_file(rebase_path_onto(), "%s\n", onto);
>> + if (orig_head)
>> + write_file(rebase_path_orig_head(), "%s\n", orig_head);
>> +
>> + if (quiet)
>> + write_file(rebase_path_quiet(), "%s\n", quiet);
>> + else
>> + write_file(rebase_path_quiet(), "");
>
> This is not a faithful conversion of the original. git-rebase.sh writes
> this 'quiet' file with:
>
> echo "$GIT_QUIET" > "$state_dir"/quiet
>
> which means that a single newline character was written even when
> $GIT_QUIET was unset/empty.
>
> I seem to recall a case in the past, when a shell-to-C conversion
> accidentally dropped a newline from a similar state-file, which then
> caused some issues later on. But I don't remember the specifics and a
> quick search didn't turn up anything relevant either...
>
I don’t think it’s a problem here, but we’re better safe than sorry.
I’ll send a fix soon.
Cheers,
Alban