Skip to content

Conversation

naiduv
Copy link

@naiduv naiduv commented Nov 5, 2019

Improve the following error text:
error: Entry 'file.txt' not uptodate. Cannot merge.
It would not appear as:
error: Entry 'file.txt' is not up to date. Cannot merge.

@gitgitgadget
Copy link

gitgitgadget bot commented Nov 5, 2019

Welcome to GitGitGadget

Hi @naiduv, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests.

Please make sure that this Pull Request has a good description, as it will be used as cover letter.

Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:

  • the lines should not exceed 76 columns,
  • the first line should be like a header and typically start with a prefix like "tests:" or "commit:", and
  • the commit messages' body should be describing the "why?" of the change.
  • Finally, the commit messages should end in a Signed-off-by: line matching the commits' author.

It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code.

Contributing the patches

Before you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a comment to your PR of the form /allow. A good way to find other contributors is to locate recent pull requests where someone has been /allowed:

Both the person who commented /allow and the PR author are able to /allow you.

An alternative is the channel #git-devel on the FreeNode IRC network:

<newcontributor> I've just created my first PR, could someone please /allow me? https://github.com/gitgitgadget/git/pull/12345
<veteran> newcontributor: it is done
<newcontributor> thanks!

Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment /submit.

After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions.

If you want to see what email(s) would be sent for a submit request, add a PR comment /preview to have the email(s) sent to you. You must have a public GitHub email address for this.

If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox ("raw") file corresponding to the mail you want to reply to from the Git mailing list. If you use GMail, you can upload that raw mbox file via:

curl -g --user "<EMailAddress>:<Password>" --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt

@naiduv naiduv changed the title Fix error message text Improve unpack trees error text Nov 5, 2019
@dscho
Copy link
Member

dscho commented Nov 5, 2019

/allow

@gitgitgadget
Copy link

gitgitgadget bot commented Nov 5, 2019

User naiduv is now allowed to use GitGitGadget.

WARNING: naiduv has no public email address set on GitHub

@dscho
Copy link
Member

dscho commented Nov 5, 2019

I think that this patch needs to change also t/t7110-reset-merge.sh, as it expects the previous form of the error message. For details, see the PR build failures at https://dev.azure.com/gitgitgadget/git/_build/results?buildId=20071&view=ms.vss-test-web.build-test-results-tab&runId=60988&resultId=117577&paneView=debug:

[...]
++ git reset --merge 'HEAD^'
++ exit_code=128
++ test 128 -eq 0
++ test_match_signal 13 128
++ test 128 = 141
++ test 128 = 269
++ return 1
++ test 128 -gt 129
++ test 128 -eq 127
++ test 128 -eq 126
++ return 0
++ grep file1 err.log
++ grep 'not uptodate'
error: last command exited with $?=1

Signed-off-by: naiduv <naiduvenkat@gmail.com>
@naiduv
Copy link
Author

naiduv commented Nov 5, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Nov 5, 2019

Submitted as pull.447.git.1572995581.gitgitgadget@gmail.com

WARNING: naiduv has no public email address set on GitHub

echo "line 5" >> file1 &&
test_tick &&
git commit -m "add line 5" file1 &&
sed -e "s/line 1/changed line 1/" <file1 >file3 &&
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Elijah Newren wrote (reply to this):

Hi,

Thanks for the contribution.  Looks like we were on similar
wavelengths, as I also contributed a fix to this phrasing just a
quarter of a day before you:
https://public-inbox.org/git/466aead9af6516ff94a5d217e58ab894e63088b7.1572973651.git.gitgitgadget@gmail.com/

On Tue, Nov 5, 2019 at 3:15 PM naiduv via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: naiduv <naiduvenkat@gmail.com>
>
> Signed-off-by: naiduv <naiduvenkat@gmail.com>
> ---
>  t/t7110-reset-merge.sh | 4 ++--
>  unpack-trees.c         | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
> index a82a07a04a..9b2298bfb3 100755
> --- a/t/t7110-reset-merge.sh
> +++ b/t/t7110-reset-merge.sh
> @@ -173,7 +173,7 @@ test_expect_success 'reset --merge fails with changes in file it touches' '
>      sed -e "s/line 1/changed line 1/" <file1 >file3 &&
>      mv file3 file1 &&
>      test_must_fail git reset --merge HEAD^ 2>err.log &&
> -    grep file1 err.log | grep "not uptodate"
> +    grep file1 err.log | grep "not up to date"
>  '
>
>  # The next test will test the following:
> @@ -189,7 +189,7 @@ test_expect_success 'reset --keep fails with changes in file it touches' '
>      sed -e "s/line 1/changed line 1/" <file1 >file3 &&
>      mv file3 file1 &&
>      test_must_fail git reset --keep HEAD^ 2>err.log &&
> -    grep file1 err.log | grep "not uptodate"
> +    grep file1 err.log | grep "not up to date"
>  '
>
>  test_expect_success 'setup 3 different branches' '
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 33ea7810d8..74c348d40e 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -29,7 +29,7 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
>         "Entry '%s' would be overwritten by merge. Cannot merge.",
>
>         /* ERROR_NOT_UPTODATE_FILE */
> -       "Entry '%s' not uptodate. Cannot merge.",
> +       "Entry '%s' is not up to date. Cannot merge.",

According to https://writingexplained.org/up-to-date-hyphenated, "up
to date" is an adverb phrase (which would not be correct to use here),
while "up-to-date" is the adjectival phrase.

>         /* ERROR_NOT_UPTODATE_DIR */
>         "Updating '%s' would lose untracked files in it",
> @@ -44,7 +44,7 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
>         "Entry '%s' overlaps with '%s'.  Cannot bind.",
>
>         /* ERROR_SPARSE_NOT_UPTODATE_FILE */
> -       "Entry '%s' not uptodate. Cannot update sparse checkout.",
> +       "Entry '%s' is not up to date. Cannot update sparse checkout.",
>
>         /* ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN */
>         "Working tree file '%s' would be overwritten by sparse checkout update.",

This patch misses a similar usage within gitk that would need to be
updated for this change.

@naiduv naiduv closed this Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants