Coder Social home page Coder Social logo

app-gitgot's Introduction

app-gitgot's People

Contributors

genehack avatar karenetheridge avatar lucywyman avatar manwar avatar mccrackend avatar perigrin avatar perlpunk avatar rjbs avatar rolpereira avatar rvandam avatar yanick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-gitgot's Issues

feature request: backup to multiple repos

First off this is an awesome application and I use it extensively everyday, so thanks for that!

One thing that I think would be cool is to have the option to backup repos to other services like bitbucket or gitorious in the off chance github.com is unavailable. And maybe keep them all in sync when doing a got push or something.

what do you think?

Thanks
Adam

`got st` should have an option to ignore dirty submodules

Hi,

as the title says, it would be great for got status to have an --ignore-submodules switch, so that repositories containing dirty submodules would not show up as being dirty. Personally, I'd like it to ignore modified content and untracked content submodules, yet report new commits, however, ignoring them completely would be fine, too.

For example, at work we have several Rails engines which are tested against a dummy clone of the main application. git status reports like this:

# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   spec/dummy (modified content, untracked content)
#
no changes added to commit (use "git add" and/or "git commit -a")

Thanks,
Malte

`got ls` should do substring match if given arg that isn't exact repo name

got ls would be more useful if it was a bit smarter.

Given a configuration containing three repos:

  • foobar
  • foobaz
  • foobarbaz

currently, got ls foo displays nothing. That seems wrong. Clearly, it should instead list all three repos. Similarly, got ls bar should list the first and the third repos in the above list.

The question is, what should got ls foobar display? Should it only display the first, because it is an exact match? Or should it display the first and the third, since the third is a substring match as well?

The disadvantage of the former approach is that it might be confusing in some cases (consider, for example, the output of got ls fooba versus got ls foobar). The disadvantage of the latter approach is that it would make got ls work differently than other subcommands that take repo names.

This could maybe be resolved via the use of an argument (or even a configuration option) detailing whether to do substring matching always, never, or only when requested.

"cpanm -L App-GitGot App::GitGot", got fails to find libraries - perl5 missing from path

When a local directory is created using cpanm for App::GitGot, the 'perl5' directory is left off the path to the libraries needed to run the program.

I have installed on Mac OS X and SUSE Linux Enterprise Server SLES 11sp2 and have had the same error.

Here is the diff from Mac OS X that fixes the error

$ diff -Naur got~ got
--- got~ 2014-08-03 08:18:39.000000000 -0500
+++ got 2014-08-03 08:19:44.000000000 -0500
@@ -8,7 +8,7 @@
use 5.010;

use FindBin;
-use lib "$FindBin::RealBin/../lib";
+use lib "$FindBin::RealBin/../lib/perl5";
use App::GitGot;
App::GitGot->run;

can't install on fresh blead

I don't know whether there are any problems with App-GitGot itself. There might be or not. The problem is that for the first time in years, I found myself in what I'd call dependency hell. :(

A good half dozen prereqs had problems, most of which I diagnosed as non-issues from the test output. I finally got stuck at Net::GitHub, which might be legit.

So, my hope is not that you fix your bugs, but that you look into whether your tool remains installable. I want to use it so I can kill off Megapull. :)

add --dirty option to 'mux' command

This option, if given, should have the effect of adding all the repos that are in a "dirty" state to the list of selected repos. This should also be valid in combination with the standard set of repo selection options (number, name, range, etc.)

feature request: 'got log [git log options] [repo-list]'

Run 'git log' in all listed repos with the given git log options. Fold the output together in a chronological way across repos.

Use case: doing end-of-week activity report, you could do something like:

got log -t work --author=me

and get all your commits, in the standard newest-first git log format.

(The folding together across streams may make this tricky to do in perl)

got help tag text is a little confusing due to duplicate -a options

got help tag has two '-a' options. One is an option to 'got' and another is an option to 'got tag'.

The help text does not immediately show this.

I tried to find a simple work around but I was not able to find anything simple in App::GitGot or App::Cmd. The 'global options' portion of App::Cmd looked interesting though.

Bash completion broken

$ complete -C got-complete -o nospace -o default got
$ got status <TAB>Undefined subroutine &main::path called at /perlbrew/perls/perl-5.18.1/bin/got-complete line 19.

Net::GitHub latest broke API

There is no Net::GitHub::V2::Repositories in current Net::GitHub but rather a Net::GitHub::V3::Repos. Replacing one for the other seems to work without a hitch.

got versioning issues

  • $ got help

does not list 'version' as an available command

  • $ got version

reports what I expect

  • $ got --version

does not report what I expect:

jsc@luskan Documents % got --version
/Users/jsc/.plenv/versions/5.20.1/bin/got
(Getopt::Long::GetOptions version 2.42; Perl version 5.20.1)

Failing tests

I don't understand GitGot enough right now to debug this. Sorry.

Both 09-update.t and 12-fetch.t fail.

Also, there are warnings coming from Path::Tiny.

perl -Ilib t/09-update.t
Unrecognized option(s) passed to make_path(): err at /home/sawyer/perl5/lib/perl5/Path/Tiny.pm line 1051.
Unrecognized option(s) passed to make_path(): err at /home/sawyer/perl5/lib/perl5/Path/Tiny.pm line 1051.
not ok 1 - repo 1
#   Failed test 'repo 1'
#   at t/09-update.t line 21.
#                   'Unrecognized command: update.
#
# Usage:
# '
#     doesn't match '(?^u:1\)\s+bar\.git\s+\:\s+Updated)'
not ok 2 - repo 2
#   Failed test 'repo 2'
#   at t/09-update.t line 22.
#                   'Unrecognized command: update.
#
# Usage:
# '
#     doesn't match '(?^u:2\)\s+bargle\.git\s+\:\s+Checked out)'
not ok 3 - nothing on STDERR
#   Failed test 'nothing on STDERR'
#   at t/09-update.t line 23.
#          got: '  commands: list the application's commands
#       help: display a command's help screen
#
#
# '
#     expected: ''
not ok 4 - exit with 0
#   Failed test 'exit with 0'
#   at t/09-update.t line 24.
#          got: '1'
#     expected: '0'
1..4
# Looks like you failed 4 tests of 4.

Extend `got mux` to be able to (optionally) create new session instead of new window.

14:17 <@perigrin> in Got::Command::mux what's the easiest/best solution to make the list-winodw/select-window commands optional?
14:17 <@perigrin> so I could swap them with list-session and select/create session
14:18 <@perigrin> s/create/new/
14:18 <@genehack> perigrin: i think a flag for that (something like '-S') would work
14:18 <@genehack> -S / --sessions
14:18 <@genehack> or maybe -S / --session
14:19 * perigrin wants to expierment with having a session-per-project workflow rather than a window-per-project workflow

'got mux' is brittle with re-attaching

(Opening this so I don't forget about it, because I'm currently out of time to debug it)

'got tmux 1' works as expected.

A second 'got tmux 1', instead of re-using the same window the previous command opened, opens a new window.

This seems to be down to something in my shell config updating the tmux window name. (I think this may be a default behavior of oh-my-zsh, since I can't find anywhere that I'm explictly turning anything like this on.)

It would be nice to find a way to do this that was independent of the tmux window name, or at least more robust in the face of changes of the name.

Renaming `master` to `main` broke a test

t/01-run.t ............... 1/32
#   Failed test 'expected answer'
#   at t/lib/Test/App/GitGot/Repo/Git.pm line 26.
#   (in Test::App::GitGot::Repo::Git->test_current_branch)
#          got: 'main'
#     expected: 'master'
# Testing with git version: 2.28.0
# Looks like you failed 1 test of 32.

Fix it!

test failures due to croak error message change in File::chdir

Failed test 'expected error message' at t/lib/Test/App/GitGot/Repo/Git.pm line 24.

'Failed to change directory to '/home/luser/proj/my-full-repo': No such file or directory at /Users/jsc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Git/Wrapper.pm line 86.'

doesn't match '(?^u:Can't locate directory)' (in Test::App::GitGot::Repo::Git->test_current_branch)

Failed test 'expected error message' at t/lib/Test/App/GitGot/Repo/Git.pm line 33.

'Failed to change directory to '/home/luser/proj/my-full-repo': No such file or directory at /Users/jsc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Git/Wrapper.pm line 86. '

doesn't match '(?^u:Can't locate directory)' (in Test::App::GitGot::Repo::Git->test_current_remote_branch)

Testing with git version: 1.9.5 (Apple Git-50.3)

Looks like you failed 2 tests of 32.

Sorry for the formatting issues.

This is because the wording of File::chdir changed.

https://metacpan.org/source/DAGOLDEN/File-chdir-0.1010/lib/File/chdir.pm

line 48.

If you'd like me to pull request fix this let me know.

Failing test

Seems to be BSD specific. In one isolated case, instead of -1, got value was 9.

#   Failed test 'exit with 0'
#   at t/05-fork.t line 79.
#          got: '-1'
#     expected: '0'
# File [/tmp/ExlYqgvXSN/gitgot] does not exist

#   Failed test 'now config exists'
#   at t/05-fork.t line 81.
YAML Error: Couldn't open /tmp/ExlYqgvXSN/gitgot for input:\nNo such file or directory
   Code: YAML_LOAD_ERR_FILE_INPUT
 at /home/cpan/pit/bare/conf/perl-5.14.2/.cpanplus/5.14.2/build/YAML-0.84/blib/lib/YAML.pm line 71.
# Tests were run but no plan was declared and done_testing() was not seen.
t/05-fork.t ............... 

t/01-run.t fails if branch.master.remote is set in global git config

My global git config is set up with:

"git config --global branch.master.remote origin"

The actual error when I run the tests is:

#   Failed test 'get 0 without real remote'
#   at t/lib/Test/App/GitGot/Repo/Git.pm line 38.
#   (in Test::App::GitGot::Repo::Git->test_current_remote_branch)
#          got: 'origin'
#     expected: '0'
#
# Test::App::GitGot::Repo::Git->test_in_writable_format
#
# Test::App::GitGot::Repo->test_accessors

If I delete the global branch.master.remote from my git config, the test passes. Am I doing it wrong?

Show branch name when using status command

Request for Enhancement

I think this module could have some value added if the current branch were shown after running the status command.

There are a bunch of ways this could be displayed in the current text output that may work. Maybe replace OK/Dirty with the branch name or something similar.

Does this sound like something you'd find value in? If so, please let me know. I can try and put something together. Keyword try.

got has a config file?

Where does got maintain the list of repositories and their configuration? Is there any got config file that we can refer to and make changes?

better/any install docs

Saw this via the OSCON talk yesterday โ€” great-looking utility. I've been out of Perl since the 90s, though, and I was rusty on how to install. I remember a one-liner from the talk, but the slides aren't up yet (?)

A line in the README about how to install here would be nice. I'm still working on it.

Migrate to App::Cmd

rt.cpan.org bug 91513 (currently still open) suggests that migration to App::Cmd is planned. I would like that because the prerequisite MouseX::App::Cmd fails its tests for me.

got should check if a repo exists before becoming interactive

I know I'm lazy, but this happens to me pretty regularly:

olaf$ got clone [email protected]:ap/Plack-Middleware-SignedCookies.git
Name:  [Plack-Middleware-SignedCookies]:
Path:  [/Users/olaf/Documents/github/Plack-Middleware-SignedCookies]:
Tags:  :
Cloning into '/Users/olaf/Documents/github/Plack-Middleware-SignedCookies'...
fatal: destination path '/Users/olaf/Documents/github/Plack-Middleware-SignedCookies' already exists and is not an empty directory.

It would be great if this exited early, before I (possibly) add tags etc.

update command should fetch, not pull

I expected the "update" command to just to a git fetch to update the remote refs for all my repos. But it actually runs git pull, which updates the remote and tries to merge it into the local branch.

It might be reasonable to have two commands, one for git fetch and another for git pull. But the one for "pull" should explicitly say that it's going to execute git pull in the help text. Alternatively, have the update command fetch by default, but provide a "--pull" option.

Failure with 'got fork <repo>' command, v 1.22

Installed latest version, set up '$HOME/.github-identity' as directed, and got a failure when executing:

$ got fork https://github.com/perl6/doc.git
Reference bless( do{(my $o = "")}, 'JSON::XS' ) did not pass type
constraint (not isa JSON::MaybeXS) (in $self->{"json"}) at (eval 280)
line 32
"InstanceOf["JSON::MaybeXS"]" requires that the reference isa JSON::MaybeXS
The reference (in $self->{"json"}) isa Exporter and JSON::XS

I got the same failure message when trying another repo.

List similar tools

Please include a brief comparision with mr and to Git::Bunch in the documentation. How does got differ from them? What are common functionalities? Why should I choose got, at all when there are similar tools?

How to specify a default-command for tmux new-window?

I liked the got tmux command. I already have a small shell script called gitme which prompts me with a menu of my repos and when I choose one it chdirs to it and invokes a subshell. However the subshell is invoked like this: bash --rcfile ~/.bashrc.git. Because normally I don't want my shell prompts to try to fetch git information when I'm not inside a git repo. Only when I'm inside a repo I setup bash to embelish its prompt with git information.

In order to do that with got tmux I guess it would have to invoke tmux new-window with a specific command instead of the default-command.

I couldn't come up with a good way to make it do so.

Would it be possible to set some global configuration in the ~/.gitgot config file or is it only for repository information? I mean, there could be a configuration option that the tmux command could check to invoke tmux with the proper arguments...

Is there another way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.