Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#196 closed defect (fixed)

Git bisect does not accept revisions

Reported by: dryeo Owned by:
Priority: Feedback pending Milestone:
Component: git Version:
Severity: medium Keywords:
Cc: dave.r.yeo@…

Description

Attempting to use git bisect always fails when trying to enter the good revision. For example, a session,

[C:\work\cc45esr\mozilla]sh
# git bisect start
# git bisect bad
# git bisect good 69cd3cf7204047ed79c3a5d6d35fe75b09e0e94e
 revision is needed
# git bisect good FIREFOX_45_5_0esr_RELEASE_OS2_Beta_8
 revision is needed
# git bisect good 7674a41
 revision is needed
#

Attachments (2)

git_bisect.log (1.4 KB) - added by dryeo 5 years ago.
Output with tracing on
git-bisect.diff (21.8 KB) - added by dryeo 5 years ago.
Diff between current git-bisect script and one from the bauxite git release.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by Silvan Scherrer

you need to debug git-bisect in /@unixroot/libexec/git-core and see where it starts to give up.

Changed 5 years ago by dryeo

Attachment: git_bisect.log added

Output with tracing on

comment:2 Changed 5 years ago by dryeo

Not sure how to debug. Running git bisect bad 69cd3cf7204047ed79c3a5d6d35fe75b09e0e94e results in the attached. Running sh -x -c git-bisect.sh bad 69cd3cf7204047ed79c3a5d6d35fe75b09e0e94e results in

+ k:/usr/libexec/git-core/git-bisect
22:59:08.415000 git.c:371               trace: built-in: git 'rev-parse' '--git-dir'
22:59:08.585000 git.c:371               trace: built-in: git 'rev-parse' '--show-cdup'
22:59:08.658000 git.c:371               trace: built-in: git 'rev-parse' '--git-path' 'objects'
usage: git bisect [help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]
Last edited 5 years ago by dryeo (previous) (diff)

comment:3 Changed 5 years ago by Silvan Scherrer

I more thought of adding some printf to the shell script and see what it does and if it makes sense at all.

comment:4 Changed 5 years ago by Silvan Scherrer

did you try to add some printf in the shell to see it it makes any sense?

comment:5 Changed 5 years ago by Silvan Scherrer

Priority: majorFeedback pending

comment:6 Changed 5 years ago by dryeo

I couldn't make heads or tails of the shell script enough to get anywhere with printf or echo.

comment:7 Changed 5 years ago by dryeo

Testing with an older version of the script (pre-RPM) does work,

C:\work\cc45esr\mozilla>git bisect start

C:\work\cc45esr\mozilla>git bisect bad

C:\work\cc45esr\mozilla>git bisect good 69cd3cf7204047ed79c3a5d6d35fe75b09e0e94e
Bisecting: 84 revisions left to test after this (roughly 6 steps)
[d1b5622450e335c0bf41bb84dafe6146019bf466] #402: M1365602

The script is about 6kb smaller.

comment:8 Changed 5 years ago by Silvan Scherrer

just using the older script? or also with a older (pre-rpm) git? I wonder if the script got broken or what. If only using a older script works, please do a diff and see what it might be.
We are not actively working on git atm, so every hint you have might speed it up.

Changed 5 years ago by dryeo

Attachment: git-bisect.diff added

Diff between current git-bisect script and one from the bauxite git release.

comment:9 Changed 5 years ago by dryeo

Just using the older script. The diff is bigger then the scripts, so hard to see what might have changed. I should try downgrading git and compare the scripts, perhaps can get a smaller diff. It's bedtime here so will have to wait.
I'll attach the diff.

comment:10 Changed 5 years ago by Silvan Scherrer

in write_terms () around line 570 is the following:

printf '%s\n%s\n' "$TERM_BAD" "$TERM_GOOD" >"$GIT_DIR/BISECT_TERMS"

change to:

printf '%s\n%s\n' "$TERM_BAD" "$TERM_GOOD" | tr -d '\r' >"$GIT_DIR/BISECT_TERMS"

means add

 | tr -d '\r'

This should fix it. please try.

comment:11 Changed 5 years ago by Silvan Scherrer

Resolution: fixed
Status: newclosed

comment:12 Changed 5 years ago by dryeo

Yes, that fixes. Thanks

Note: See TracTickets for help on using tickets.