git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Julliard <julliard@winehq.org>
To: Jari Aalto <jari.aalto@cante.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] contrib/emacs/git.el: Add user functions for push, pull, fetch
Date: Sun, 03 Apr 2011 19:27:24 +0200	[thread overview]
Message-ID: <87mxk7454z.fsf@wine.dyndns.org> (raw)
In-Reply-To: <87tyef9uu5.fsf@picasso.cante.net> (Jari Aalto's message of "Sun, 03 Apr 2011 19:13:22 +0300")

Jari Aalto <jari.aalto@cante.net> 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@winehq.org

  reply	other threads:[~2011-04-03 17:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 13:30 [PATCH] git.el: Add new user functions for push, pull, fetch jari.aalto
2011-03-22 14:36 ` [PATCH v2] contrib/emacs/git.el: Add " jari.aalto
2011-04-03 16:13   ` Jari Aalto
2011-04-03 17:27     ` Alexandre Julliard [this message]
2011-04-03 17:48       ` [PATCH v3] " jari.aalto
2011-04-14 21:07         ` [PATCH v4] " jari.aalto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxk7454z.fsf@wine.dyndns.org \
    --to=julliard@winehq.org \
    --cc=git@vger.kernel.org \
    --cc=jari.aalto@cante.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).