https://github.com/git/git
Revision 65e25ae52298e9f1a8c7d94fd0ddffaf30cd944e authored by Junio C Hamano on 04 August 2023, 17:52:31 UTC, committed by Junio C Hamano on 04 August 2023, 17:52:31 UTC
"git branch -f X" to repoint the branch X said that X was "checked
out" in another worktree, even when branch X was not and instead
being bisected or rebased.  The message was reworded to say the
branch was "in use".

* jc/branch-in-use-error-message:
  branch: update the message to refuse touching a branch in-use
2 parent s f4a7c24 + 4970bed
Raw File
Tip revision: 65e25ae52298e9f1a8c7d94fd0ddffaf30cd944e authored by Junio C Hamano on 04 August 2023, 17:52:31 UTC
Merge branch 'jc/branch-in-use-error-message'
Tip revision: 65e25ae
mount-fileshare.sh
#!/bin/sh

die () {
	echo "$*" >&2
	exit 1
}

test $# = 4 ||
die "Usage: $0 <share> <username> <password> <mountpoint>"

mkdir -p "$4" || die "Could not create $4"

case "$(uname -s)" in
Linux)
	sudo mount -t cifs -o vers=3.0,username="$2",password="$3",dir_mode=0777,file_mode=0777,serverino "$1" "$4"
	;;
Darwin)
	pass="$(echo "$3" | sed -e 's/\//%2F/g' -e 's/+/%2B/g')" &&
	mount -t smbfs,soft "smb://$2:$pass@${1#//}" "$4"
	;;
*)
	die "No support for $(uname -s)"
	;;
esac ||
die "Could not mount $4"
back to top