[GSoC][PATCH v4] fixup! rebase -i: rewrite write_basic_state() in C

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

 



As pointed out by SZEDER Gábor, git-rebase.sh wrote to to 'quiet' with
an `echo`:

    echo "$GIT_QUIET" > "$state_dir/quiet"

This mean that even if $GIT_QUIET is empty, a newline is written to
quiet.  The rewrite of write_basic_state() changed this behaviour, which
could lead to problems.  This patch changes the rewritten version to
behave like the shell version.

Signed-off-by: Alban Gruin <alban.gruin@xxxxxxxxx>
---
Hi Junio, could you apply this patch on top of ag/rebase-i-in-c, please?

 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index d257903db0..0d41e82953 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2332,7 +2332,7 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
 	if (quiet)
 		write_file(rebase_path_quiet(), "%s\n", quiet);
 	else
-		write_file(rebase_path_quiet(), "");
+		write_file(rebase_path_quiet(), "\n");
 
 	if (opts->verbose)
 		write_file(rebase_path_verbose(), "");
-- 
2.18.0




[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