Commit Graph

589 Commits

Author SHA1 Message Date
Nathan Broadbent
9913996b3c Merge pull request #177 from armen/master
Fixes 'git fetch' and 'git checkout' liases, closes #176
2015-05-28 21:49:47 +07:00
Armen Baghumian
5dd21beeea Fixes 'git fetch' and 'git checkout' liases, closes #176 2015-05-28 14:05:33 +00:00
Nathan Broadbent
6183ba963e Merge pull request #175 from armen/master
Fixed __git_alias bug in zsh
2015-05-26 21:59:24 +07:00
Armen Baghumian
ff4ae7932d Fixed __git_alias bug in zsh 2015-05-26 12:46:11 +00:00
Nathan Broadbent
d288f3cd74 Fixed bug in __git_alias 2015-05-25 23:01:14 +07:00
Nathan Broadbent
737a5d795b Merge pull request #173 from armen/master
Offset starts from 0 so the argument would be 3
2015-05-21 14:12:50 +07:00
Armen Baghumian
1ef06aa9cd Offset starts from 0 so the argument would be 3
This patch fixes broken aliases which have arguments (e.g. gap)
2015-05-21 04:09:57 +00:00
Nathan Broadbent
7684788d4b Merge pull request #171 from jsravn/master
Fix quoting of semicolon and pipe
2015-05-10 23:43:12 +07:00
James Ravn
bdf6096808 Fix quoting of semicolon and pipe 2015-05-10 00:39:05 +01:00
Nathan Broadbent
4917a4f558 Merge pull request #169 from stephanvane/patch-1
Fixes #168 (zsh-problems)
2015-05-08 20:50:11 +07:00
Stephan van Eijkelenburg
e9217f50ab Fixes #168 (zsh-problems)
This PR replaces `local varname=value` style declarations with `local varname; varname=value`. This solves #168 which caused troubles in zsh environments
2015-05-07 17:02:34 +02:00
Josh Hagins
40e91b81ff Add alias for git diff -w -- 2015-05-06 12:49:30 -04:00
Josh Hagins
9e24890de6 Add alias for git pull --rebase 2015-05-06 12:48:43 -04:00
Josh Hagins
d763faa68c Add aliases for submodule update 2015-05-06 12:48:11 -04:00
Nathan Broadbent
d52ad497bc Merge pull request #162 from jawshooah/fix_git_alias
Fix argument expansion in __git_alias
2015-05-02 18:17:24 +07:00
Nathan Broadbent
9b9058ebc5 Merge pull request #164 from jeanblanchard/ls-aliases
Make ls aliases optional
2015-03-11 22:58:01 +06:00
Jean Blanchard
349896b0cf Make ls aliases optional 2015-03-06 09:41:31 +00:00
Josh Hagins
84b765eab9 Fix argument expansion in __git_alias 2015-01-20 22:38:49 -05:00
Nathan Broadbent
5ea1e69405 Added example gif 2014-12-27 21:31:10 +06:00
Nathan Broadbent
2194bb1fae gcob => gcb (alias for git checkout -b) 2014-12-17 10:55:35 +06:00
Nathan Broadbent
fef74e26a5 Added alias for git pull-request (hub) 2014-12-17 10:52:48 +06:00
Matthew Rothenberg
c6b9c398c8 temp before_script to debug sort order on travis
I tested manually on OSX and linux, but lets make sure the same thing is
true on travis-ci builds.
2014-10-20 15:16:04 -04:00
Matthew Rothenberg
9a9b6104e2 Compatibility fix for Design Assets Management
design.sh uses `readlink -m` to determine canonical path of git dir,
which is not available on all *nix systems (including Darwin).

Instead, use `pwd -P` to get canonical directory path in a more
cross-platform compatible way.

This is a change to an actual script rather than just a test, and it
should make the Design Assets Management functionality of scm_breeze
now function properly on MacOSX.
2014-10-16 17:20:49 -04:00
Matthew Rothenberg
c234916b2b scripts should exit rather than return
some shells are pickier about this.  darwin uses a newer version of sh
that complains about it.  this is the ‘proper’ behavior in either
scenario.
2014-10-16 17:08:29 -04:00
Matthew Rothenberg
ae4b93f52f declare original location of cmds
The previous tests assumed default locations for all commands, however
they do not exist in the same place on all *nixes.  I encountered this
when the test was failing on MacOSX where it was expected hardcoded
`/bin/sed` when in fact the code was identifying the correct local
expansion of `/usr/bin/sed`.

To make this test more robust, it now checks for the original location
of all cmds and uses that in its expansion tests for
`test_shell_command_wrapping()`.
2014-10-16 17:05:43 -04:00
Matthew Rothenberg
1cd162434f Make sure we have physical path back from mktemp
Darwin actually symlinks /var inside /private, but mktemp reports back
the logical pathat time of file creation.  So make sure we always get
the full physical path to be absolutely certain when doing comparisons
later, because thats how the Ruby status_shortcuts.rb script is going to
obtain them.
2014-10-16 17:05:43 -04:00
Matthew Rothenberg
b2d86a16b2 use perl instead of sed -r to strip colors in test
`sed -r` is not present on some BSD based systems, including MacOSX
Darwin.  perl is standard pretty much everywhere, so this a more
reliable way to test.

Since this is only used for tests, any performance differences
should not matter significantly.
2014-10-16 15:31:12 -04:00
Matthew Rothenberg
b395596496 dont use grep -P for cross-platform compatibility
`grep -P` gives access to the PCRE matching engine, which is nice,
however, the version of grep shipped on many BSD systems (including
Darwin) does not have this flag.

Currently, `grep -P` was being used in the `_includes()` test helper.

For cross platform compatibility in tests, do not rely upon this option.
Luckily, all existing tests seem to work fine without it already!
2014-10-16 15:26:34 -04:00
Matthew Rothenberg
f056d28b2e remove redundant test envs
they were just there when we were making sure the env variable shell
selection was working properly in all cases, now that we know it is,
they can be removed.
2014-10-16 15:25:58 -04:00
Matthew Rothenberg
e7c56c7647 only install zsh on boxes that need it
don’t bother on macosx (preinstalled) or if the test matrix for that
box isn’t going to be testing in zsh.

this should speed up test runs for most cases, and later we can define
fast_failure and not have to wait for the longer ones.
2014-10-16 15:25:58 -04:00
Matthew Rothenberg
b6fd7ae829 split tests up by shell for concurrency
More parallelism = faster tests.  Also better isolation for changes that
might only break on zsh or bash respectively.

This is defined via env variable, so someone running locally will have
all tests run sequentially as before.
2014-10-16 15:24:53 -04:00
Matthew Rothenberg
802f4987c3 set up multi-os testing in travis
Requires beta access, thankfully the travis gods have blessed us for the
main repo and my fork!

This should allow us to make sure scm_breeze operates reliably in both
Linux and BSD/Darwin, because there are small shell differences
(especially with default tools) that are causing errors I noticed on
MacOSX.
2014-10-16 15:23:10 -04:00
Matthew Rothenberg
23e99709da integrate branch parsing into single system call
The `git status --porcelain` command can take an additional argument
`-b` which causes the porcelain output to also contain branch
information in a stable and supposedly nonchanging way.

This change adds that argument to the initial `git status` call, and
parses the branch/ahead/behind information from that.  The end result is
the entire call to `git branch -v` can be removed, resulting in one less
subshell command and hopefully a more reliable target across future
versions of git.
2014-10-15 02:41:21 -04:00
Matthew Rothenberg
ed2240e214 BUGFIX: actually clear variables
The current `git_clear_vars()` method appears to have iterated over all
the existing set variable correctly, but never actually bothered to
clear them.
2014-10-15 02:21:35 -04:00
Nathan Broadbent
885cc6fc12 Merge pull request #151 from mroth/zsh_undefine_alias_fix
fix ability to undefine default aliases in zsh
2014-10-04 21:38:22 -07:00
Matthew Rothenberg
f14015fc3e aliases: consistent indentation and quotation
this is unrelated to the previous commit and zero functionality but
while I was changing things I wanted to clean up the indentation and
use consistent single quotes versus double quotes in the functions
calls for `_alias()` and `_git_alias()`.

In my opinion this makes the file more readable, but if it bothers you
let me know and I’ll be happy to remove it from the pull request.
2014-10-02 21:01:58 -04:00
Matthew Rothenberg
70c9501550 fix ability to undefine default aliases in zsh
The ability to not define default aliases in the `.git.scmbrc` file
leading to not having those aliases not present worked fine in bash.

However, this seems to still have thrown an error in zsh.  For example,
if you commented out the line:

        git_checkout_alias="gco"

then when sourcing scm_breeze aliases.sh would throw an error.

This applied only to aliases defined with the `_alias()` function and
not those with the `_git_alias()` function.

To fix this, I wrapped `_alias()` in a similar check to the one
`_git_alias()` has, where it passes the portions as arguments and
verifies the first is present before proceeding.

I'm not 100% certain why seperate functions exist for these two things
to begin with (as far as I can tell from a cursory examination the main
difference is `_git_aliases()` defines a tab completion?) but I believe
my change has fixed the ability to comment out aliases in `.git.scmbrc`
in zsh for users who do not want them (I'm in this boat, there are too
many for me and I get confused).

I tested manually in both bash and zsh and it appears to work, however
you might want to review this before merging given my relative
unfamiliarity with the codebase.
2014-10-02 20:42:43 -04:00
Nathan Broadbent
2908a3e397 Merge pull request #150 from mroth/gh
`gh` is the new `hub`
2014-10-02 11:27:12 -07:00
Matthew Rothenberg
1e9d60a06a gh is the new hub
`gh` is the new `hub`, rewritten to be fast and efficient.
http://owenou.com/gh/

If has been adopted by GitHub themselves and will replace `hub`
entirely, see:
https://github.com/github/hub/issues/475

This patch simply checks for `gh` as a possible `_git_cmd` in addition
to hub, restoring scm_breeze functionality for people who have switched
to gh.
2014-10-02 14:19:36 -04:00
Nathan Broadbent
bda4fab9bd Merge pull request #145 from aero-z/fix-rename-modify
Don't show oldname -> newname for unstaged modifications
2014-07-23 23:12:14 -07:00
Nathan Broadbent
38aeef92e2 Merge pull request #148 from keen99/patch-2
add a bit more detail around install.sh in readme
2014-07-08 14:07:29 -07:00
keen99
ee450688fb add a bit more detail around install.sh in readme
install.sh is really required, you can't just clone source and go.
2014-07-08 17:04:31 -04:00
Nathan Broadbent
47111d274d Merge pull request #147 from keen99/patch-1
_create_or_patch_scmbrc is not noclobber safe
2014-07-08 13:09:40 -07:00
keen99
a1afeef0c4 make _create_or_patch_scmbrc noclobber safe
use >| instead of > to override noclobber on write (works for both bash and zsh)
2014-07-08 16:01:58 -04:00
aero-z
ee5c1e5aa0 Changing the output for git status when there is a rename and modify at the same time 2014-06-12 02:47:56 -04:00
Nathan Broadbent
3e09624f8a Merge pull request #131 from chasballew/git_add_all_deprecation_fix
Fix upcoming Git 2.0 breaking change to `git add -A`.
2014-04-10 00:32:10 -07:00
Nathan Broadbent
61a101176f Merge pull request #137 from ilkka/master
Ensure C locale is used when processing command output
2014-04-10 00:31:31 -07:00
Test User
65088ce716 Ensure C locale is used when processing command output
This change makes sure LC_MESSAGES is set to C whenever command output
is run through grep, sed etc. Otherwise aliasing will fail whenever
localized messages are printed.

This should fix #98 and #64.
2014-04-08 13:21:16 +03:00
LFDM
fe1d4435a7 Refactor, commenting, polishing. 2014-01-29 22:53:20 +01:00
LFDM
33b561ebc1 status_shortcuts.rb completely rewritten 2014-01-29 21:05:24 +01:00