git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* View remote logs?
@ 2008-10-14  7:19 Todd A. Jacobs
  2008-10-14  8:10 ` Jeff King
  2008-10-14  8:21 ` Michael J Gruber
  0 siblings, 2 replies; 3+ messages in thread
From: Todd A. Jacobs @ 2008-10-14  7:19 UTC (permalink / raw)
  To: git

I've Googled around, and tried some experiments with likely-looking
tools like git log, git diff, and git ls-remote, but they only seem to
operate on the local repository. In particular, there doesn't seem to be
an obvious way to view the commit logs on a remote repository without
pulling it first.

On an intuitive level, it seems like "git log origin" would allow me to
see what someone has committed to a remote repository so I can decide
whether it's something I want to pull. Even something like "git diff
HEAD origin" would let me know if there were changes I might want to
pull before doing so.

Am I missing something obvious? Is it possible to use the CLI to view
remote logs, or is the only choice to pull everything?

-- 
"Oh, look: rocks!"
	-- Doctor Who, "Destiny of the Daleks"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: View remote logs?
  2008-10-14  7:19 View remote logs? Todd A. Jacobs
@ 2008-10-14  8:10 ` Jeff King
  2008-10-14  8:21 ` Michael J Gruber
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2008-10-14  8:10 UTC (permalink / raw)
  To: git

On Tue, Oct 14, 2008 at 12:19:07AM -0700, Todd A. Jacobs wrote:

> I've Googled around, and tried some experiments with likely-looking
> tools like git log, git diff, and git ls-remote, but they only seem to
> operate on the local repository. In particular, there doesn't seem to be
> an obvious way to view the commit logs on a remote repository without
> pulling it first.

Remember that pull is really "fetch + merge". So you can do just the
fetch part without affecting your local branches.

> On an intuitive level, it seems like "git log origin" would allow me to
> see what someone has committed to a remote repository so I can decide

It does. It just uses the remote tracking branch for "origin" instead of
contacting the remote.

> whether it's something I want to pull. Even something like "git diff
> HEAD origin" would let me know if there were changes I might want to
> pull before doing so.

And that works, too. Once fetched, you can use "origin" as you would any
other ref.

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: View remote logs?
  2008-10-14  7:19 View remote logs? Todd A. Jacobs
  2008-10-14  8:10 ` Jeff King
@ 2008-10-14  8:21 ` Michael J Gruber
  1 sibling, 0 replies; 3+ messages in thread
From: Michael J Gruber @ 2008-10-14  8:21 UTC (permalink / raw)
  To: git

Todd A. Jacobs venit, vidit, dixit 14.10.2008 09:19:
> I've Googled around, and tried some experiments with likely-looking
> tools like git log, git diff, and git ls-remote, but they only seem to
> operate on the local repository. In particular, there doesn't seem to be
> an obvious way to view the commit logs on a remote repository without
> pulling it first.
> 
> On an intuitive level, it seems like "git log origin" would allow me to
> see what someone has committed to a remote repository so I can decide
> whether it's something I want to pull. Even something like "git diff
> HEAD origin" would let me know if there were changes I might want to
> pull before doing so.
> 
> Am I missing something obvious? Is it possible to use the CLI to view
> remote logs, or is the only choice to pull everything?

You can always fetch (rather than pull) and then decide whether to pull
(i.e. merge or rebase FETCH_HEAD) or not.

The problem with "remote log" is that log can show diffstats, full diffs
etc, so that it would need all new objects anyways.

If you want to avoid fetching new objects the only way is to run git log
etc. on the remote side. You can do this with ssh, but the other
transports (git:, http:) don't support this.

Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-14  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14  7:19 View remote logs? Todd A. Jacobs
2008-10-14  8:10 ` Jeff King
2008-10-14  8:21 ` Michael J Gruber

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).