Subject: [PATCH v4 5/5] File updation [GSOC]

From: "Arsh Srivastava via GitGitGadget" <[email-masked]>
Date: Wed, 11 Mar 2026 08:50:28 +0000

From: Arsh Srivastava <[email-masked]>

I have ran tests locally for this file
and tried to fix all the CI issues
Lets Hope it works

Signed-off-by: Arsh Srivastava <[email-masked]>
---
 t/t6439-merge-co-error-msgs.sh | 6 ++++--
 t/t7406-submodule-update.sh    | 3 ++-
 unpack-trees.c                 | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/t/t6439-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh
index 6ebc1d2565..cf996e0e51 100755
--- a/t/t6439-merge-co-error-msgs.sh
+++ b/t/t6439-merge-co-error-msgs.sh
@@ -78,7 +78,8 @@ error: Your local changes to the following files would be overwritten by checkou
 	rep/two
 Please commit your changes or stash them before you switch branches.
 Try using 'git checkout -m <branch>' for a quick fix.
-Please Note :- that using -m (merge) will not save your changes, rather would directly merge them. Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
+Please Note :- that using -m (merge) will not save your changes, rather would directly merge them.
+Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
 Aborting
 EOF
 
@@ -102,7 +103,8 @@ error: Your local changes to the following files would be overwritten by checkou
 	rep/two
 Please commit your changes or stash them before you switch branches.
 Try using 'git checkout -m <branch>' for a quick fix.
-Please Note :- that using -m (merge) will not save your changes, rather would directly merge them. Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
+Please Note :- that using -m (merge) will not save your changes, rather would directly merge them.
+Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
 Aborting
 EOF
 
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index a359429bf5..2e4cc9b3fe 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -213,7 +213,8 @@ test_expect_success 'submodule update should fail due to local changes' '
 	> 	file
 	> Please commit your changes or stash them before you switch branches.
 	> Try using '\''git checkout -m <branch>'\'' for a quick fix.
-	> Please Note :- that using -m (merge) will not save your changes, rather would directly merge them. Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
+	> Please Note :- that using -m (merge) will not save your changes, rather would directly merge them.
+	> Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone.
 	> Aborting
 	> fatal: Unable to checkout OID in submodule path '\''submodule'\''
 	EOF
diff --git a/unpack-trees.c b/unpack-trees.c
index cb4cdee9b9..9835a82455 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -129,7 +129,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 		msg = advice_enabled(ADVICE_COMMIT_BEFORE_MERGE)
 		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
 			  "Please commit your changes or stash them before you switch branches.\n"
-			  "Try using 'git checkout -m <branch>' for a quick fix. \n"
+			  "Try using 'git checkout -m <branch>' for a quick fix.\n"
 			  "Please Note :- that using -m (merge) will not save your changes, rather would directly merge them.\n"
 			  "Meaning if you are not able to resolve conflicts and does --hard reset your local changes would be gone."
 			  )
-- 
gitgitgadget