Re: RBTools Ticket #4822: RBTools 1.0.2 has an issue when you run rbt diff with --parent option.

1 view
Skip to first unread message

David Watson

unread,
Jan 16, 2020, 2:17:20 PM1/16/20
to David Watson, Jack Dai, reviewboa...@googlegroups.com
To reply, visit https://hellosplat.com/s/beanbag/tickets/4822/

New update by dwatson.arbor

For Beanbag, Inc. RBTools Ticket #4822

I fixed an identical issue by modifying _find_remote() in clients/git.py.

The code eventually calls: all_remotes = self._execute(['git', 'remote'], split_lines=True). split_lines=True causes execute() to call data.splitlines(True) which preserves newlines. Then _find_remote() runs if 'origin' in all_remotes:. This fails (for me) because the contents of all_remotes is ["origin\n"] (note the trailing newline). Changing the if check to be if 'origin\n' in all_remotes: fixes the issue for me. If that's the right way to fix this, then obviously the else block needs to return all_remotes[0].strip() to get rid of the newline if origin is not in the list.

I didn't do anyting to figure out if there was something that should be changing upstream to prevent getting into this function in the first place. This code appears to be wrong, so I just stopped once this fixed the issue.

Reply all
Reply to author
Forward
0 new messages