Skip to content

Commit

Permalink
umpf: call rev-parse on manually selected local branches as well
Browse files Browse the repository at this point in the history
When umpf compares branches between all of the known remotes, it will now
prompt the user when it discovers a branch that includes additional commits
compared to the one on the selected remote.

If the user confirms, the branch name is taken as is, which would result in
an umpf-hashinfo of e.g. heads/v6.4/topic/something, which breaks the
ability of doing identical umpfs.

To restore that ability, we use the result of calling rev-parse on the
${branch}, which is conveniently available already in ${b}.

Fixes: 000e642 ("umpf: add branch choice in case of additional commits")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
  • Loading branch information
a3f committed Sep 5, 2023
1 parent dd30788 commit 6973dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion umpf
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ find_branch_rev() {
local choice=""
read -e -i n -p "Use ${branch} instead? [y/n]: " choice
if [ "${choice}" == "y" ]; then
reply="${branch}"
reply="${b}"
fi
fi
fi
Expand Down

0 comments on commit 6973dd0

Please sign in to comment.