Skip to content

Commit

Permalink
Oops, forgot about spaces in the dirname.
Browse files Browse the repository at this point in the history
Quite likely for Windows users to hit this problem.
  • Loading branch information
nvie committed Dec 1, 2011
1 parent 4b9545e commit 5e8cc9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-flow
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi

# The sed expression here replaces all backslashes by forward slashes.
# This helps our Windows users, while not bothering our Unix users.
export GITFLOW_DIR=$(dirname $(echo "$0" | sed -e 's,\\,/,g'))
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

usage() {
echo "usage: git flow <subcommand>"
Expand Down

3 comments on commit 5e8cc9f

@mhart
Copy link

@mhart mhart commented on 5e8cc9f Dec 1, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about the "not bothering our Unix users" bit - there's the extra overhead of calling out to sed, and anyone with a backslash in their directories will have it replaced (this will be very rare I realise).

What's the issue with checking for the OS?

@nvie
Copy link
Owner Author

@nvie nvie commented on 5e8cc9f Dec 1, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue is that there doesn't seem to be a reliable way of doing so. uname is the standard way of doing this, but it is missing on the Windows platform. (Although the lack of uname could well imply we're on Windows, LOL.)

The extra sed call being "overhead" is not a very useful discussion. Tens of sed are done under the cover already with day-to-day use of git-flow. Degraded performance ain't an interesting con-argument, especially not in the context of this discussion.

@mhart
Copy link

@mhart mhart commented on 5e8cc9f Dec 1, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough then.

Please sign in to comment.