Re: [PATCH v2] contrib/emacs/git.el: Add user functions for push, pull, fetch

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

 



Jari Aalto <jari.aalto@xxxxxxxxx> writes:

> @@ -1555,6 +1561,13 @@ amended version of it."
>      (define-key map "x"   'git-remove-handled)
>      (define-key map "\C-?" 'git-unmark-file-up)
>      (define-key map "\M-\C-?" 'git-unmark-all)
> +    ; remotes
> +    (define-key remote-map "\C-a" 'git-push)
> +    (define-key remote-map "R" 'git-pull)  ; retrieve "RR"
> +    (define-key remote-map "r" 'git-pull)  ; retrieve "Rr" (synonym)
> +    (define-key remote-map "p" 'git-push)
> +    (define-key remote-map "f" 'git-fetch)
> +    (define-key remote-map "\C-a" 'git-fetch)

The \C-a things look strange.

> +(defun git-push (&optional remote)
> +  "Pull to REMOTE. Use \\[current-prefix-arg] to interactively set REMOTE."
> +  (interactive
> +   (list (or (and current-prefix-arg
> +		  (git-ask-remote "Push to remote: "))
> +	     "origin")))
> +  ;; FIXME: could colled some status data for display
> +  (git-call-process-display-error "push" remote)
> +  (git-update-status-files)
> +  (message "Pushed to remote: %s" remote))

You shouldn't display a success message if the call failed. Also there's
no need to refresh the status files on push or fetch.

-- 
Alexandre Julliard
julliard@xxxxxxxxxx
--
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]