Skip to content

Fragile coding practices #5

@AnrDaemon

Description

@AnrDaemon

The code like

	grep $short_refname "$GIT_DIR/locked"
	if [ $? -eq 0 ] ; then

is fragile - it is prone to break on future refactoring.
Also, it contains TWO other issues.

Much cleaner is to directly write what you intend the code to do:

	if grep -F "$short_refname" "$GIT_DIR/locked"; then

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions