Coder Social home page Coder Social logo

textmate / git.tmbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jcf/git-tmbundle

27.0 10.0 23.0 1.12 MB

The Git TextMate Bundle

Home Page: http://jcf.github.com/git-tmbundle

License: MIT License

Ruby 83.03% JavaScript 1.35% CSS 6.91% HTML 8.71%

git.tmbundle's Introduction

The Git Textmate Bundle

Installation

You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.

  • Many shortcuts are available from the SCM shortcut ⌘Y Subversion commands are ⌘⌥G. Less frequent commands are accessed via the menu.

Support

The Mailing list has now been closed. Please feel free to report issues using the Issue tracker.

Theme notes:

The “Git Commit Message” Language defines two scopes that can be used by a theme to generate “line too long” warnings for the first line of the commit:

  • invalid.deprecated.line-too-long.git-commit
  • invalid.illegal.line-too-long.git-commit

The warning scope triggers when the first line exceeds 50 characters; the error scope over 65 characters. These aren’t generally-used TextMate scopes, so you can add new rules to your preferred themes, such as orange background/red background. You can also edit the regex to change the preferred character counts.

Development

Running Specs

The specs must be run with Ruby 1.8.7 (p358). Use your Ruby version manager of choice to install this version. Then, with this version activated (and Support/ as current directory), run gem install --file Gemfile to install the appropriate versions of RSpec and hpricot.

When running the specs from the command line you need to set TM_SUPPORT_PATH explicitly. The following should work:

export TM_SUPPORT_PATH=~/Library/Application\ Support/TextMate/Managed/Bundles/Bundle\ Support.tmbundle/Support/shared

To run the specs then use:

spec spec/

Who:

Previous Maintainers

Git-tmbundle superstars

The Git TextMate Bundle wouldn’t be possible without the contributions of the following fine gentlemen:

Major Contributions

  • Allan Odgaard – Started the bundle, got it rolling. Many patches. Oh, and TextMate :-).
  • Sam Granieri – GitK, Many of the git-svn commands, Git initialize repository command, menu layouting, create-tag.
  • Johan Sørensen – Contributing the CSS styling.

Please feel free to send a pull request if you’ve added any functionality to this bundle that you think the rest of the git-loving, TextMate-using world would appreciate!

git.tmbundle's People

Contributors

4rc0s avatar adamv avatar capnslipp avatar dbarros avatar fredb avatar heavysixer avatar henrik avatar infininight avatar jacob-carlborg avatar kevinsawicki avatar lawrencepit avatar loe avatar lsegal avatar lukaso avatar melo avatar mgranberry avatar mikezter avatar noniq avatar onkis avatar pieter avatar rdwampler avatar samgranieri avatar sorbits avatar steffans avatar stepheneb avatar subtlegradient avatar tbates avatar timcharper avatar timshadel avatar waldyrious 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git.tmbundle's Issues

The commit option

The commit option only commits the selected file and not all the files added to the index. The functionality either needs to be changed or a second option added that does a $ git commit -m 'hello world'
committing all indexed files to the repo.

Expand button for the log command doesn't work on Sierra

If I run the Git Log command (Bundles -> Git -> Log) and try to click on the + button, in the output that is generated by the command, nothing happens. Looking in the web inspector, the following JavaScript error occurs:

TypeError: Not enough arguments
	setAttribute (toggle.js:19)
	toggle_diff (toggle.js:19)
	Global Code (Script Element 2:1)

Most git functions broken

Using the git bundle in 2.0-alpha.9503, I am no longer able to add files to the index or check status. When I select "Add to index" I get a message confirming that the current file has been added, but this does not check out when I call git status from the command line. Additionally, Checking the status using the bundle results in a blank page. This broke recently, though I cannot say exactly when.

Selecting commit overwrites/hides diff

With TextMate 2 and the git bundle, if you show uncommitted changes and then do a commit, the diff (uncommitted changes window) disappears/is replaced by the commit window ("Committing Files in ‘xyz’ on branch ‘master’)

Steps to reproduce:

  1. Command-Y
  2. Show Uncommitted Changes
  3. Command-Y
  4. Commit…

Since this second ("committing…") window doesn't actually contain anything, please don't show it — and leave the existing diff window there.

In a git-rebase-todo file, parsing for comment syntax is incomplete. Not all comments have correct syntax highlighting.

Original vscode issue

Inside git-rebase-todo files, there is no syntax highlighting for # comments

CleanShot 2022-08-02 at 22 17 43

Steps to Reproduce:

  1. Ensure clean git status
  2. Create an empty commit git commit -m "asdf" --allow-empty
  3. Start interactive rebase git rebase -i HEAD~1
  4. Note the line with pick 809y2e3 asdf ends with # empty. This is a code comment in this file.
  5. Add a line to the git-rebase-todo file:
  6. exec echo 'asdf' # comment
  7. Close file, to begin rebasing.
  8. Observe that the echo 'asdf' prints a plain asdf and the # comment does not interfere at all.

If you scroll to the bottom of a git-rebase-todo file, you'll see a large block of comments created by git, a guide for doing the interactive rebase. Note that these comments are green (I'm using vscode's default dark theme)

Unable to delete local branch with slashes in the name

If you are trying to delete a local branch called feature/some-branch, TextMate will try to look for feature, ignoring the bits that come after.

I didn't understand's git's response, perhaps you can make sense of it?
fatal: 'feature' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Better Annotate

I have a fork (https://github.com/pkmiec/git.tmbundle/commits/mouseSelectsJustText) where I'm working on the following changes,

  • updated annotate / diff to "column" based layout which allows copy & paste of the code (without including all the "gutter" stuff like rev / author / date / line numbers).
  • show commit message when hovering over rev in annotate
  • add open in github (for projected hosted there)

I wanted to know whether these changes could be merged back in? If so, what are the steps? The instructions seem to be quite old.

Also, I'm having trouble figuring out how to run the specs,

git.tmbundle/Support %> bundle exec rspec
/Users/pkmiec/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/rubygems_integration.rb:292:in `block in replace_gem': rspec-core is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

Any help would be appreciated.

Ambiguos argument --no-ext-diff

When I run "Show Uncommited Changes" command, the output is empty. Then, when I click "Open diff in TextMate", it opens with the following error text:

fatal: ambiguous argument '["--no-ext-diff"]': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

That's my current Git version:

➜  git --version
git version 1.8.1.4

Commit does not use selection anymore

I used to be able to select some files in the project drawer, press cmd-Y, select commit and then I would be able to commit those files.

Now, if I do this, nothing happens.

/dev/console Permission denied

Unsure what I did (or what happened) that broke my Git integration but I now get a: sh: /dev/console: Permission denied when I try to make a commit. I don't exclude this being my fault but I tried everything to fix it, and have already done the following (to no avail):

  • uninstalled / reinstalled Git bundle
  • uninstalled / reinstalled TM command line tools
  • uninstalled / reinstalled Git on my system (using brew)

Note that this error doesn't occur when the directory is clean (because I've committed using command line) and the interface shows the correct message (that the directory is clean).

I'm using version 2.0-beta.7.1 of TextMate

Any idea what may be causing this?

Jump to the current line when using "git-blame"

I'm talking about the "Browse Annotated File (Blame)" option. When using this command often it becomes tiresome to look for the current line in the opened window. The line is highlighted but anyway when there's more than 2k lines it takes much time searching for the place.

Specs require Ruby version that's EOL since 2014

README.md says:

The specs must be run with Ruby 1.8.7 (p358).

However, Ruby 1.8.7 went End of Life in 2014: https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/

I just tried to use RVM to install Ruby 1.8.7 on my mac, but the installation failed because of compilation errors.

What I really want to do is to fix the Git Commit Message grammar to work on non-English locales. And for that I want to run the specs so I don't break anything, and to make sure my changes do what I expect.

What would be the easiest way for me to run the specs?

Clicking on the commit in the blame window does not take me to that commit anymore

The commits listed in the left most column in the blame view are hyperlinks that used to take me to the version of the file at the time of that commit. That has not worked anymore for quite some time now.

Opening the inspector reveals the following error:

[Error] TypeError: null is not an object (evaluating 'document.querySelector('option[value="' + revision + '"]').readAttribute')
show_annotation (1:5075)
onclick (Script Element 21:1)

Support for highlighting non-English commit messages

Please add support for highlighting non-English commit messages, see example below.

Right now, the diff part gets no highlighting. What I expect is to see added lines in green and removed lines in red.


# Ange incheckningsmeddelandet för dina ändringar. Rader som inleds
# med "#" kommer ignoreras, och ett tomt meddelande avbryter incheckningen.
#
# På grenen main
# Ändringar att checka in:
#	ändrad:        hej
#
# ------------------------ >8 ------------------------
# Raden ovan får inte ändras eller tas bort.
# Allt under den kommer tas bort.
diff --git hej hej
index 257cc56..5716ca5 100644
--- hej
+++ hej
@@ -1 +1 @@
-foo
+bar

I initially intended to do this myself but got stuck on #59.

Error when running any command

I get the following error whenever I run a command from the Git bundle:

�[31mFail whale detected!�[0m

TM_SUPPORT_PATH is not set. This is probably because you are running
specs from outside of TextMate.

You can set TM_SUPPORT_PATH using something like...

  export TM_SUPPORT_PATH='/Applications/TextMate.app/Contents/SharedSupport/Support'

I found this thread on the TextMate mailing list, but the solution suggested by Allan didn't work for me.

I'm not sure where to start debugging this. Any help would be much appreciated.

"sh: command not found" error when performing Git push or pull

Error when pulling:

sh: : command not found
/Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:238:in `load': Cannot parse a NULL or zero-length data (OSX::PropertyListError)
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:238:in `request_item'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/../app/controllers/remote_controller.rb:48:in `pull'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `send'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:94:in `with_filters'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:105:in `call'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/lib/application_controller.rb:112:in `call'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:56:in `dispatch_normal'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:74:in `dispatch'
	from /Users/rimbunar/Library/Application Support/TextMate/Managed/Bundles/Git.tmbundle/Support/tmvc/tmvc.rb:96:in `dispatch'
	from Pull:4

Output of Ruby version:

$ ruby --version
ruby 1.8.7 (2014-01-28 patchlevel 376) [i686-darwin18.2.0]

Mac OS version is Catalina 10.15.7

Root folder in the project drawer is not selectable

Hi

Let's assume I have project in /home/bbkr/project and I also have bin/, lib/, t/ directories in it. I was editing something in lib/ and t/, then browsed bin/. Now I want to commit _all_ changes and I get message:

No changes to commit within the current scope.
(Try selecting the root folder in the project drawer?)

This error message is misleading as TM2 does not allow to select root folder in project drawer. The bar where "project" directory name is displayed is actually a pulldown and is not selectable.
It also does not allow do deselect last opened directory, to get rid of bin/ context in my example.

BTW: I know the workarounds: select all directories in project drawer -> commit -> deselect OR use pulldown mentioned above to jump one directory above my project -> select it there -> commit -> return to project. Both are very annoying :(

So either message should me modified to something like "Try selecting everything in project drawer" or there should be easier way for top directory commits.

Thanks

Git push not working

Hi,
I'm having trouble getting TextMate to work with Netlify Git's credential helper. After installing netlify-credential-helper I get this error in TextMate:
image

I can git push from my Terminal just fine. My git config -l looks like this:

credential.helper=osxkeychain
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
user.name=rodrigoalcarazdelaosa
[email protected]
git-tmbundle.gitnub-path=https://github.com/rodrigoalcarazdelaosa
credential.helper=osxkeychain
include.path=/Users/rodrigoalcarazdelaosa/.netlify/helper/git-config
credential.helper=
credential.helper=netlify
credential.helper=osxkeychain
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com/rodrigoalcarazdelaosa/rodrigoalcarazdelaosa.me.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
lfs.https://084c644c-1539-4d00-93bc-dc75f576de30.netlify.app/.netlify/large-media.access=basic
lfs.https://084c644c-1539-4d00-93bc-dc75f576de30.netlify.app/.netlify/large-media.locksverify=false

As you can see, I'm using two different credential helpers (netlify and osxkeychain) but after the line:

git-tmbundle.gitnub-path=https://github.com/rodrigoalcarazdelaosa

I only have credential.helper=osxkeychain which may be the source of this issue but I have no idea really.

Can anyone help me?
Thanks in advance!

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.