From 81ede0a4ba762fe24a3096f77926aa86b3422903 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Fri, 8 Oct 2010 10:14:29 -0300 Subject: [PATCH 1/7] show ignored files if no arguments are provided --- bin/git-ignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-ignore b/bin/git-ignore index 7747dcb..d7a6fed 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -1,10 +1,10 @@ #!/bin/sh if test $# -eq 0; then - echo "arguments required" && exit 1 + cat .gitignore else for pattern in $@; do echo $pattern >> .gitignore echo "... added '$pattern'" done -fi \ No newline at end of file +fi From 68cf02be47a6d245538bbf1eeacd80b227dfd220 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Fri, 8 Oct 2010 10:32:02 -0300 Subject: [PATCH 2/7] added git-delete-submodule for delete submodules easily --- AUTHORS | 1 + bin/git-delete-submodule | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 bin/git-delete-submodule diff --git a/AUTHORS b/AUTHORS index d1ac7f3..502a89e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,3 +15,4 @@ Patches and Suggestions - Domenico Rotiroti - Jason Young - Nick Campbell +- Jonhnny Weslley diff --git a/bin/git-delete-submodule b/bin/git-delete-submodule new file mode 100755 index 0000000..a5472bf --- /dev/null +++ b/bin/git-delete-submodule @@ -0,0 +1,9 @@ +#!/bin/sh + +test -z $1 && echo "submodule required" && exit 1 +test ! -f .gitmodules && echo ".gitmodules file not found" && exit 2 +test -z $(git config --file=.gitmodules submodule.$1.url) && echo "submodule not found" && exit 3 + +git config --remove-section submodule.$1 +git config --file=.gitmodules --remove-section submodule.$1 +git rm --cached $1 From e53bb372c16ccae9b987be6878d5164e8491e728 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Fri, 8 Oct 2010 10:39:25 -0300 Subject: [PATCH 3/7] add some usage notes to git-delete-submodule --- Readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Readme.md b/Readme.md index 69a8c10..976fbab 100644 --- a/Readme.md +++ b/Readme.md @@ -20,6 +20,7 @@ Brew: - git commits-since - git count - git delete-branch + - git delete-submodule - git delete-tag - git fresh-branch - git graft @@ -172,6 +173,12 @@ of commits included in the commitish: $ git delete-branch integration +## git-delete-submodule <name> + + Deletes submodule _name_. + + $ git delete-submodule lib/foo + ## git-delete-tag <name> Deletes local and remote tag _name_. From b2713b5e56911f95b3dfd21cb6b3e3cec52220bb Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Fri, 8 Oct 2010 11:48:10 -0300 Subject: [PATCH 4/7] automatically remove trailing slash from argument if it exists --- bin/git-delete-submodule | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/git-delete-submodule b/bin/git-delete-submodule index a5472bf..ceb1fa9 100755 --- a/bin/git-delete-submodule +++ b/bin/git-delete-submodule @@ -2,8 +2,10 @@ test -z $1 && echo "submodule required" && exit 1 test ! -f .gitmodules && echo ".gitmodules file not found" && exit 2 -test -z $(git config --file=.gitmodules submodule.$1.url) && echo "submodule not found" && exit 3 -git config --remove-section submodule.$1 -git config --file=.gitmodules --remove-section submodule.$1 -git rm --cached $1 +NAME=$(echo $1 | sed 's/\/$//g') +test -z $(git config --file=.gitmodules submodule.$NAME.url) && echo "submodule not found" && exit 3 + +git config --remove-section submodule.$NAME +git config --file=.gitmodules --remove-section submodule.$NAME +git rm --cached $NAME From 9bc2f5900a3e77330cf5cb23500a19936a65a0d7 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 8 Oct 2010 08:31:06 -0700 Subject: [PATCH 5/7] new git-ignore docs --- Readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Readme.md b/Readme.md index 976fbab..252bbf5 100644 --- a/Readme.md +++ b/Readme.md @@ -167,6 +167,12 @@ of commits included in the commitish: ... added '*.o' ... added '*.log' + Running `git-ignore` without a pattern will display the current patterns: + $ git ignore + build + *.o + *.log + ## git-delete-branch <name> Deletes local and remote branch _name_. From ccd7c8e2048b64e15fb5520f2fabf121e0581c3c Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 8 Oct 2010 08:33:49 -0700 Subject: [PATCH 6/7] Release 0.0.5 --- History.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/History.md b/History.md index b6cff10..72143af 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,12 @@ +0.0.5 / 2010-10-08 +================== + + * Added `git-delete-submodule` [Jonhnny Weslley] + * Added; `git-ignore` without pattern shows .gitignore contents [Jonhnny Weslley] + * Added; `git-setup` argument is now optional, defaulting to the CWD + * Added REPL alias "ls" as ls-files + 0.0.4 / 2010-09-10 ================== From 75af76d2ac3d13e59b0f3307097f07c0821247d4 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Fri, 8 Oct 2010 08:34:31 -0700 Subject: [PATCH 7/7] Bump version --- bin/git-extras-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-extras-version b/bin/git-extras-version index fdaff3e..45bef39 100755 --- a/bin/git-extras-version +++ b/bin/git-extras-version @@ -1,2 +1,2 @@ #!/bin/sh -echo "0.0.4" \ No newline at end of file +echo "0.0.5" \ No newline at end of file