* Git vs svn. Is ... possible ?
@ 2008-03-28 13:24 Rafał Mużyło
2008-03-28 13:36 ` Adam Piatyszek
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rafał Mużyło @ 2008-03-28 13:24 UTC (permalink / raw)
To: git
Well, the actual question is:
In svn I can do a remote diff (diff between two remote revisions) without
having to do a checkout, is this possible for git ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git vs svn. Is ... possible ?
2008-03-28 13:24 Git vs svn. Is ... possible ? Rafał Mużyło
@ 2008-03-28 13:36 ` Adam Piatyszek
2008-03-28 14:31 ` Theodore Tso
2008-03-28 14:09 ` Bill Lear
2008-03-31 15:41 ` John Goerzen
2 siblings, 1 reply; 5+ messages in thread
From: Adam Piatyszek @ 2008-03-28 13:36 UTC (permalink / raw)
To: Rafa? Mu?y?o; +Cc: git
Hi Rafał,
* Rafa? Mu?y?o [28 III 2008 14:24]:
> Well, the actual question is:
> In svn I can do a remote diff (diff between two remote revisions) without
> having to do a checkout, is this possible for git ?
The question makes no sense to me. Git by design is a distributed SCM
tool, so there is no such thing like "remote revisions". You can have
tracking branches (clones) of some remote repositories, but all the
commits on such branches are also stored locally. So you have full
access to them, even without a permanent connection to such remote
repositories.
And answering to the second part of your question: Yes, you can do "git
diff" operation between any of the commits in the repository you are
working with. No need to checkout before. You can perform "git diff"
even on a bare repository without the working three.
Please refer to "man git-diff" for more info.
BR,
/Adam
PS. The encoding you used for your message is not playing well with the
Polish accented characters in your name ;)
--
.:. Adam Piatyszek (ediap) .:.....................................:.
.:. ediap@users.sourceforge.net .:................................:.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git vs svn. Is ... possible ?
2008-03-28 13:24 Git vs svn. Is ... possible ? Rafał Mużyło
2008-03-28 13:36 ` Adam Piatyszek
@ 2008-03-28 14:09 ` Bill Lear
2008-03-31 15:41 ` John Goerzen
2 siblings, 0 replies; 5+ messages in thread
From: Bill Lear @ 2008-03-28 14:09 UTC (permalink / raw)
To: Rafał Mużyło; +Cc: git
On Friday, March 28, 2008 at 14:24:38 (+0100) =?utf-8?B?UmFmYcWCIE11xbx5xYJv?= writes:
>Well, the actual question is:
>In svn I can do a remote diff (diff between two remote revisions) without
>having to do a checkout, is this possible for git ?
I'm not sure what you mean by "two remote revisions". Do you mean you
are on machine X, and you want to diff content on machine Y and
machine Z? If so, you could probably do that in git fairly easily
with some script magic that would fetch the remote branches into local
tracking branches, and then diff them. This would not literally
require you to perform a "checkout", but you would need a git repo
(actually a script could take care of creating a temporary repo, fetch
into it, do the diff and then remove the temporary repo when done).
If you are talking about having an existing repo on machine X and
diffing content that is on machine Y, you can do a fetch followed by a
diff, so in that case you can do it literally "without having to do a
checkout". Example: if you are working on master and want to see what
is different between what you have and what is in a remote repo you
are tracking, you can do "git fetch" then "git diff origin/master".
Bill
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git vs svn. Is ... possible ?
2008-03-28 13:36 ` Adam Piatyszek
@ 2008-03-28 14:31 ` Theodore Tso
0 siblings, 0 replies; 5+ messages in thread
From: Theodore Tso @ 2008-03-28 14:31 UTC (permalink / raw)
To: Adam Piatyszek; +Cc: Rafa? Mu?y?o, git
On Fri, Mar 28, 2008 at 02:36:25PM +0100, Adam Piatyszek wrote:
>
> The question makes no sense to me. Git by design is a distributed SCM tool,
> so there is no such thing like "remote revisions". You can have tracking
> branches (clones) of some remote repositories, but all the commits on such
> branches are also stored locally. So you have full access to them, even
> without a permanent connection to such remote repositories.
>
It would certainly be possible to *implement* such a thing, but first
question would be, "why would you want to". One of the things that
makes git so nice is that repositories don't take that much space, and
if you have a local repository (or no network access at all) it's much
faster to consult the local repository at all.
In fact, with svn, I normally consider it a bug that you *have* to
consult the remote repository to do a diff between two arbitrary
revisions.
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git vs svn. Is ... possible ?
2008-03-28 13:24 Git vs svn. Is ... possible ? Rafał Mużyło
2008-03-28 13:36 ` Adam Piatyszek
2008-03-28 14:09 ` Bill Lear
@ 2008-03-31 15:41 ` John Goerzen
2 siblings, 0 replies; 5+ messages in thread
From: John Goerzen @ 2008-03-31 15:41 UTC (permalink / raw)
To: git
On 2008-03-28, Rafa? Mu?y?o <galtgendo@o2.pl> wrote:
> Well, the actual question is:
> In svn I can do a remote diff (diff between two remote revisions) without
> having to do a checkout, is this possible for git ?
You can craft URLs to gitweb in specific ways to do this. For
instance:
http://git.complete.org/branches/redmine-integration/?a=commitdiff_plain;h=fb-bug-738-projects-block;hp=upstream
Shows the diff from branch upstream to branch
fb-bug-738-projects-block. You can replace the branch names with the
full 40-character SHA1 ids as well.
Leave off the "_plain" and you get diff highlighting.
The header at the top of this thing is going to be a bit misleading,
but the content is what you want.
-- John
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-31 16:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 13:24 Git vs svn. Is ... possible ? Rafał Mużyło
2008-03-28 13:36 ` Adam Piatyszek
2008-03-28 14:31 ` Theodore Tso
2008-03-28 14:09 ` Bill Lear
2008-03-31 15:41 ` John Goerzen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox