Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BF: tolerate errors while parsing fetch lines#1015

Merged
Byron merged 1 commit intogitpython-developers:masterfrom
yarikoptic:bf-fetch-configmsg
May 31, 2020
Merged

BF: tolerate errors while parsing fetch lines#1015
Byron merged 1 commit intogitpython-developers:masterfrom
yarikoptic:bf-fetch-configmsg

Conversation

@yarikoptic
Copy link
Contributor

At first I thought to provide special treatment to git config lines and
otherwise keep raising uncaught exception, but then decided that it might be
better to loose some progress information than to crash.
Also _get_push_info below is doing similarish catching of all exceptions
(although doesn't even log them).

With this change, log (if enabled and not suppressed) would show

[WARNING] Git informed while fetching: git config pull.rebase false  # merge (the default strategy)

in the case of recently introduced change to the output in the following
git commit :

d18c950a69f3a24e1e3add3d9fc427641f53e12b is the first bad commitcommit d18c950a69f3a24e1e3add3d9fc427641f53e12bAuthor: Alex Henrie <alexhenrie24@gmail.com>Date:   Mon Mar 9 21:54:20 2020 -0600pull: warn if the user didn't say whether to rebase or to mergeOften novice Git users forget to say "pull --rebase" and end up with anunnecessary merge from upstream. What they usually want is either "pull--rebase" in the simpler cases, or "pull --ff-only" to update the copyof main integration branches, and rebase their work separately. Thepull.rebase configuration variable exists to help them in the simplercases, but there is no mechanism to make these users aware of it.Issue a warning message when no --[no-]rebase option from the commandline and no pull.rebase configuration variable is given. This willinconvenience those who never want to "pull --rebase", who haven't hadto do anything special, but the cost of the inconvenience is paid onlyonce per user, which should be a reasonable cost to help a number of newusers.Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>Signed-off-by: Junio C Hamano <gitster@pobox.com> builtin/pull.c               | 16 ++++++++++++++++ t/t5521-pull-options.sh      | 22 +++++++++++----------- t/t7601-merge-pull-config.sh | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 11 deletions(-)

Closes#1014

At first I thought to provide special treatment to git config lines andotherwise keep raising uncaught exception, but then decided that it might bebetter to loose some progress information than to crash.Also _get_push_info below is doing similarish catching of all exceptions(although doesn't even log them).With this change, log (if enabled and not suppressed) would show[WARNING] Git informed while fetching: git config pull.rebase false  # merge (the default strategy)in the case of recently introduced change to the output in the followinggit commit :d18c950a69f3a24e1e3add3d9fc427641f53e12b is the first bad commitcommit d18c950a69f3a24e1e3add3d9fc427641f53e12bAuthor: Alex Henrie <alexhenrie24@gmail.com>Date:   Mon Mar 9 21:54:20 2020 -0600pull: warn if the user didn't say whether to rebase or to mergeOften novice Git users forget to say "pull --rebase" and end up with anunnecessary merge from upstream. What they usually want is either "pull--rebase" in the simpler cases, or "pull --ff-only" to update the copyof main integration branches, and rebase their work separately. Thepull.rebase configuration variable exists to help them in the simplercases, but there is no mechanism to make these users aware of it.Issue a warning message when no --[no-]rebase option from the commandline and no pull.rebase configuration variable is given. This willinconvenience those who never want to "pull --rebase", who haven't hadto do anything special, but the cost of the inconvenience is paid onlyonce per user, which should be a reasonable cost to help a number of newusers.Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>Signed-off-by: Junio C Hamano <gitster@pobox.com> builtin/pull.c               | 16 ++++++++++++++++ t/t5521-pull-options.sh      | 22 +++++++++++----------- t/t7601-merge-pull-config.sh | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 11 deletions(-)Closesgitpython-developers#1014
@ByronByron merged commita71ebbc intogitpython-developers:masterMay 31, 2020
@ByronByron added this to thev3.1.3 - Bugfixes milestoneMay 31, 2020
@Byron
Copy link
Member

Thanks a lot!
Since this is an issue many users could start seeing soon, I will cut a release right away.

yarikoptic reacted with thumbs up emojiyarikoptic reacted with rocket emoji

@yarikopticyarikoptic deleted the bf-fetch-configmsg branchMay 31, 2020 03:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Development

Successfully merging this pull request may close these issues.

git v2.27.0-rc0~150^2 changed output on pull breaking GitPython parsing

2 participants

@yarikoptic@Byron

[8]ページ先頭

©2009-2026 Movatter.jp