From aa9c8e3c89e5a5bce9bd55a90813ca17ead53765 Mon Sep 17 00:00:00 2001 From: Joel Moss Date: Mon, 18 Jul 2011 02:24:22 -0700 Subject: [PATCH 1/6] Added period in find command --- git-map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 git-map diff --git a/git-map b/git-map old mode 100755 new mode 100644 index 21915f0..cfc6233 --- a/git-map +++ b/git-map @@ -32,7 +32,7 @@ REPOGITDIR=$(git rev-parse --git-dir 2> /dev/null) if [ $? -eq 0 ] ; then cd "${REPOGITDIR}"/../../ fi -for dir in $(find -maxdepth 2 -type d -name .git -exec dirname '{}' \;); do +for dir in $(find . -maxdepth 2 -type d -name .git -exec dirname '{}' \;); do echo "Running \"git $@\" in ${dir}"; (cd ${dir}; git $@) || exit $? done From b5b190af7b97ba2f5f52461aa13edbbe1ee3f90d Mon Sep 17 00:00:00 2001 From: Mohamed Mansour Date: Wed, 20 Jul 2011 08:19:55 -0700 Subject: [PATCH 2/6] Adding the prune command to improve performance. If you have many git projects on an NFS, it will tremendously slow down because it will continue to keep finding even if the .git folder exists. This improves performance significantly. --- git-map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-map b/git-map index cfc6233..270d398 100644 --- a/git-map +++ b/git-map @@ -32,7 +32,7 @@ REPOGITDIR=$(git rev-parse --git-dir 2> /dev/null) if [ $? -eq 0 ] ; then cd "${REPOGITDIR}"/../../ fi -for dir in $(find . -maxdepth 2 -type d -name .git -exec dirname '{}' \;); do +for dir in $(find . -maxdepth 2 -type d -name .git -prune -exec dirname '{}' \;); do echo "Running \"git $@\" in ${dir}"; (cd ${dir}; git $@) || exit $? done From 20316f330af4a07947dd25dd487ada8195dfe10c Mon Sep 17 00:00:00 2001 From: Benjamin C Meyer Date: Sun, 31 Jul 2011 17:00:32 -0400 Subject: [PATCH 3/6] Change git-map back to being executable. --- git-map | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 git-map diff --git a/git-map b/git-map old mode 100644 new mode 100755 From ab72d16dfbcacd6014c863485c570eb40d78c02c Mon Sep 17 00:00:00 2001 From: Benjamin C Meyer Date: Thu, 4 Aug 2011 23:49:27 -0400 Subject: [PATCH 4/6] Tweak the description of the script. --- git-map | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-map b/git-map index 270d398..66ddf35 100755 --- a/git-map +++ b/git-map @@ -1,6 +1,7 @@ #!/bin/bash # -# git-map is a tool to execute a Git command in multiple git directories. +# git-map is a tool to execute a Git command in multiple Git repositories +# that are located in the same directory. # # Copyright (c) 2011, Benjamin C. Meyer # All rights reserved. From fcf2d3c6e18c001bd329755e52a499600f8409ad Mon Sep 17 00:00:00 2001 From: Benjamin C Meyer Date: Thu, 4 Aug 2011 23:49:42 -0400 Subject: [PATCH 5/6] Add an install section to the readme. --- README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README b/README index 2207fc0..1faef44 100644 --- a/README +++ b/README @@ -18,3 +18,8 @@ Example If you are in ~/dev/projectA and running 'git map pull --rebase' will execute 'git pull --rebase' in repo1, repo2, and repo3. If you are in ~/dev/projectA/repo1/some/sub/directory and run 'git map pull --rebase' it will do the same thing. + +INSTALL +======= + +Add the location of git-map to your PATH or install it in a location that is already in your PATH such as $HOME/bin From 9cdeda5729bed533a297f626dd2551de7597e2c2 Mon Sep 17 00:00:00 2001 From: Ming Xie Date: Mon, 25 Jan 2016 14:53:15 -0500 Subject: [PATCH 6/6] Fix an issue where we couldn't pass commit messages with '-m' --- git-map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-map b/git-map index 66ddf35..0d2fe4d 100755 --- a/git-map +++ b/git-map @@ -35,5 +35,5 @@ if [ $? -eq 0 ] ; then fi for dir in $(find . -maxdepth 2 -type d -name .git -prune -exec dirname '{}' \;); do echo "Running \"git $@\" in ${dir}"; - (cd ${dir}; git $@) || exit $? + (cd ${dir}; git "$@") || exit $? done