RFC: Folder Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most days I work on more than one repository, and on more than one
machine. I've never needed the "--" argument separator so far. This
combination makes it useful to have a way to run Git commands on
several repositories at once. A one-time solution would of course be a
for-loop which checks for a .git directory before running the given
command, but this operation ended up being frequent enough that I
wrote a script for it: fgit
<https://github.com/l0b0/fgit/blob/master/fgit.sh>. Features include:
* Runs the Git command given in all specified directories which have a
.git subdirectory, and warns about any that lack this directory.
* Should work with any path, containing spaces, newlines or other
exotic characters.
* Should work with any Git command that doesn't require the "--"
separator between the options and arguments.
* Prints the Git command before running it, for logging and repetition.
* errexit and nounset are active for each line, with one exception:
errexit is disabled for the running of the command, to allow it to
continue to other repositories.

Issues:
* Don't know if anyone else has used it. Probably not, so there's
bound to be issues (especially since it's been changed quite a bit the
last couple days for this RFC).

Is there a place for such a tool in Git porcelain or elsewhere in the
Git project, or should it be kept completely separate?

-- 
Victor Engmark
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]