49 Commits

Author SHA1 Message Date
David Catmull 9b0ce4ca3c forward declarations 2011-05-26 21:48:17 -06:00
Leszek Ślażyński f47fd3c696 Feature: reset current branch to here 2011-03-17 11:45:41 -07:00
Tomasz Krasnyk 7deb309dbb Merge branch 'refs/heads/experimental' into stashes
Conflicts:
	GitX.xcodeproj/project.pbxproj
	PBGitCommitView.xib
	PBGitHistoryView.xib
	PBRefController.m
2010-11-28 23:33:06 +01:00
Nathan Kinsinger 62319b8cd9 Allow suppressing some of the modal warnings
This allows the user to suppress the display of some of the warning dialogs (like "Confirm before Push"). They can be reset with Reset Warnings in the General preferences.
2010-11-17 19:50:48 -07:00
Tomasz Krasnyk cc5c93c2b6 - stashes can be created with optional message
- added clearing all stashes
- added possibility to ignore files with given extension
- submodules are now showed
- submodules can be opened
2010-11-07 23:37:41 +01:00
Nathan Kinsinger 6f83f2382c Bugfix: Rebasing the head ref
Only use the ref being rebased onto otherwise git will create a detached HEAD.
2010-09-19 14:33:33 -06:00
Nathan Kinsinger 18725fdd65 Prevent drag and drop of tags and remote branches
Moving an annotated tag would convert it to a lightweight tag and lose the tags message.

Given that tags are meant to represent a fixed point in the history and remote branches represent the state of the remote I'm disabling moving them.
2010-09-12 19:32:53 -06:00
Nathan Kinsinger b28afa1644 Add the contextual menu to the other columns of the commit list
Now all the columns have the menu for the commit, not just the subject column.
2010-09-12 19:32:50 -06:00
Nathan Kinsinger 986f49f70a Don't allow drag-n-drop for the checked out branch.
Moving the checked out branch would cause odd things to happen to git's index.
2010-08-22 14:14:49 -06:00
André Berg e192ce801d Set a copy of the "Push" message strings for the alert panel message with a small case "p" letter because it will be appended in the middle of a sentence. 2010-06-27 06:27:08 -06:00
Nathan Kinsinger a0b11cfed1 Remove the observers from the ref controller
The ref controller is no longer responsible for updating the commit controller.
2010-03-13 22:16:31 -07:00
Nathan Kinsinger c19d2c8058 Add Diff to contextual menus
- added to menus for refs, commits, and files
    - show a message when there are no changes
2010-03-13 22:16:24 -07:00
Nathan Kinsinger 388818b045 Make the accept drop window a document modal sheet
- don't do anything if the ref is dropped on the old commit
    - clean up the message
    - allow it to be suppressed
2010-03-13 22:15:58 -07:00
Nathan Kinsinger c36726b985 Update the GUI to be more iApp like
- In PBGitSidebarView.xib
        - change indentation to 12
        - change font size to 11
        - disable the editable behavior
        - disable autoresizing
        - disable user resizing (column should resize with view)
        - remove the window
        - remove the shared user defaults controller (not being used)
    - add a project item with the project's name
    - a "Stage" item to go to what has been called the commit view
    - new icons for branches, remote branches and tags (created by Nathan Kinsinger)
    - remove the old tiff icons, PBSourceViewRemote.h/m and PBSourceViewAction.h/m from the xcode project
    - uses system icon for folder
    - uses Network icon for remotes
    - capitalize group names
    - rename the Custom group to Other (you can't really customize items in the traditional sense)
    - create a class for each item type that takes care of it's image (instead of trying to guess the image from it or it's parent's name)
    - remove the branch menu toolbar item from the history view, it's redundant now
2010-03-13 22:13:06 -07:00
Nathan Kinsinger 6e405972e8 Add Push to the contextual menus for refs 2010-03-13 12:52:29 -07:00
Nathan Kinsinger 46e996f5c6 Add Pull to the contextual menus for refs 2010-03-13 12:52:26 -07:00
Nathan Kinsinger 4654dc105f Add Fetch to the contextual menus for refs 2010-03-13 12:52:22 -07:00
Nathan Kinsinger 7eec230959 Add Rebase to the contextual menu for commits and refs 2010-03-13 12:42:10 -07:00
Nathan Kinsinger e50ddbc503 Add Cherry Pick to contextual menu for commits. 2010-03-13 12:42:06 -07:00
Nathan Kinsinger e2ccfe6fce Add Merge in the contextual menus for commits and refs 2010-03-13 12:42:02 -07:00
Nathan Kinsinger 8359883c92 Rename removeRef: to showDeleteRefSheet:
- move the core of the delete implementation to the repository as deleteRef:
    - move it to it's own pragma mark section
2010-03-13 12:41:56 -07:00
Nathan Kinsinger 69d67820f6 Add Checkout
Checkout:
    - PBGitRepository: add checkoutRefish:
    - PBRefController: renamed checkoutRef: to checkout: and use new method in PBGitRepository
    - add to the contextual menus for commits (it was already in the menu for refs)
    - add "Checkout branch" checkbox to the Create Branch sheet
        - store the state in the defaults
    - tell the commitController to rearrangeObjects so that the refs highlight correctly (seems to only be a problem when going from a branch to a detached HEAD at the same commit)
2010-03-13 12:41:30 -07:00
Nathan Kinsinger aa4a24a579 Add Create Tag
A Create Tag item:
    - A new class (and xib) PBCreateTagSheet
    - In the Repository menu
    - In the contextual menu for commits

PBRefController the method tagInfo:
    - renamed to showTagInfoSheet:
    - moved it under the Tags mark
2010-03-13 12:41:24 -07:00
Nathan Kinsinger e43a87e3f8 Add Copy SHA and Copy Patch items to commit contextual menu 2010-03-06 16:32:48 -07:00
Nathan Kinsinger 9f048f6363 Update Create Branch
Update the methods for creating a branch.
    - create new class and xib PBCreateBranchSheet
    - remove old addRef: methods and iVars from PBRefController
    - remove old sheet from PBHistoryView.xib
    - put the implementation method in PBGitRepository
    - add a contextual menu item for commits
    - shows an error sheet
    - ask the commitController to rearrangeObjects to make sure the new branch is shown
    - switch from using "update-ref" to "branch" so that branches starting at a remote branch will track automatically (or not depending on the repo's settings)
2010-03-06 16:30:50 -07:00
Nathan Kinsinger ff5f3f7979 Add methods dealing with menus needed for future features.
Switch from storing both the ref and the commit to storing just one or the other as a refish.

Change action methods that receive PBRefMenuItem to support the change in functionality. In particular the removeRefSheetDidEnd:returnCode:contextInfo: method in PBRefController now looks up the commit for the ref (this was the only place that needed both the ref and the commit).
2010-03-06 15:58:20 -07:00
Nathan Kinsinger 87f76fd5a1 Bugfix: fix the contextual menu and drag-n-drop of refs
When the Subject column is not the first column in the git history table the contextual menu for refs and dragging and dropping refs don't work.

Offset the mouse click's x value by the x origin of the Subject column.

In PBRefController look up the column index of the subject column and check that it's the clicked column (don't assume it's the first one).
2010-02-19 22:54:25 -07:00
Nathan Kinsinger fbc1902764 Switch Delete Remote panel to a window modal sheet 2010-02-19 22:26:14 -07:00
Johannes Gilger 13746a5a6b PBGitWindowController: Use beginSheetModalForWindow instead of runModal
Introduce a new showMessageSheet/showErrorSheet-method for
PBGitWindowController which uses the beginSheetModalForWindow method of
NSAlert whereever possible. This has the advantage over runModal as it
doesn't block the other instances of GitX and is generally more
unobstrusive for simple status-messages.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-09 18:33:02 +02:00
Johannes Gilger 64b977e9c8 PBGitRepository: Add method to remove branch
This adds a removeBranch method similar to the addBranch method. It
calls these methods when a branch is created/deleted in the UI, avoiding
the cost of simply calling refresh afterwards.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-06 17:23:51 +01:00
Pieter de Bie 38198a9e27 Merge branch 'stable'
* stable:
  GitRevList -- Try to read the encoding of the commit message
  GitRevList: fix crash when loading 0 commits
  Tickets #151 and #155: check for illegal branch names before creating.
2009-05-28 15:12:16 +01:00
Charles O'Rourke 353d1053b0 Tickets #151 and #155: check for illegal branch names before creating. 2009-05-28 13:46:12 +01:00
Pieter de Bie 7caf7d799a Merge branch 'stable'
* stable:
  Fix many gcc 4.2 compiler warnings
  GitX.xcodeproj: Quote paths in custom shell scripts
  Fix compilation with GCC 4.2
  IndexController: Temporarily stop tracking when (un)staging
  IndexController: Add methods to stop tracking the Index
  ChangesTableView: Remove warning by casting to correct class

Conflicts:
	PBGitCommitController.m
2009-05-18 23:11:11 +01:00
Benjamin Kramer 6dcefe5bec Fix many gcc 4.2 compiler warnings 2009-05-18 23:08:51 +01:00
Mike Czepiel 7e74efba0d Added very basic tag info menu item and alert.
Simply renders the tag message when activated.
This would also make sense being available in
the web view somewhere.
2009-05-18 22:55:27 +01:00
Johannes Gilger 49a21e655f PBRefController: Ask for confirmation when deleting tags/branches
Show a very simple user-dialog when trying to delete a branch or a
tag.
This satisfies ticket #115.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-28 22:32:59 +00:00
Pieter de Bie 971e8e5bcc PBRefController: Only set title if we have a rev
We used to unconditionally set the title of the branch
to the current branch. This worked fine in most cases
where the current branch was already known, but failed
when you use 'gitx -c' and then switch to the HistoryView,
because then the currentBranch isn't known yet.

The simple fix is to check if we know it. If we don't,
it'll be set later on.
2009-01-19 22:20:16 +00:00
Mark Bestley 35f20cddd5 GitRefController: Fix moving and updating branches
This was also broken with the libgit2 move
2008-12-01 13:59:29 +01:00
Pieter de Bie 32e30ad351 HistoryView: Always show the correct current branch 2008-11-19 02:21:13 +01:00
Pieter de Bie b2c03bc97b HistoryView: Correctly update branches when changing them
I stupidly used "observe.." instead of register.. so KVC
didn't even work
2008-11-19 02:12:03 +01:00
Pieter de Bie a62e14ffe7 HistoryView: Remove the BranchController
This wasn't used anyway. A good idea would be to create a new
branchcontroller that takes care of all these revs, rather than
letting PBGitRepository take care of that
2008-11-19 01:54:14 +01:00
Pieter de Bie 92437c6663 WIP: Use a nicer branches menu 2008-11-19 01:41:27 +01:00
Pieter de Bie a950505972 PBRefController: reload items when checking out branch
This will update the view with the new current branch.
2008-11-17 14:03:06 +01:00
Pieter de Bie 00e44b35d0 RefController: Allow checking out branches 2008-11-01 23:24:41 +01:00
Pieter de Bie 058fbcff58 RefController: Refactor ref menu to its own class 2008-11-01 23:16:41 +01:00
Pieter de Bie e02ee5231c WebHistoryController: Move ref deletion to RefController
That's why it's there, after all. This also makes the system
more robust and catches some more errors.

The next thing this enables is to also allow right-clicking
on refs in the commit list.
2008-11-01 22:51:10 +01:00
Pieter de Bie 8a399c0793 GitCommit: Add a 'removeRef' function
The ref functionality is somewhat weird right now, in that
some parts of the code require a nil array when there are no
refs. So, we add a good removeRef accessor to keep track of this
2008-11-01 22:51:10 +01:00
Pieter de Bie 23c918660c HistoryView: Allow creation of branches 2008-11-01 22:51:10 +01:00
Pieter de Bie 4cefe8ee92 HistoryView: Allow dragging of refs to move them 2008-11-01 21:14:24 +01:00