* How to compare different files in different branches
@ 2008-06-06 12:24 Nico -telmich- Schottelius
2008-06-06 12:30 ` Jonathan del Strother
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Nico -telmich- Schottelius @ 2008-06-06 12:24 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]
Hello!
I want to compare 'configure.in' from the master branch with
'configure.ac' from the gpm-2-dev branch.
What I tried:
% git-diff master..gpm-2-dev configure.ac
fatal: ambiguous argument 'configure.ac': unknown revision or path not
in the working tree.
Use '--' to separate paths from revisions
# ok, correct, there is no configure.ac in master
# But not what I want.
% git-diff master..gpm-2-dev configure.in
# shows that the file does not exist in gpm-2-dev. Correct.
# But not what I want.
Strange ist:
% git-diff --summary master...gpm-2-dev
and
% git-diff --stat master...gpm-2-dev
do not show the rename.
But using
% git log -Sconfigure gpm-2-dev
I find the rename in commit 5fe49d36d775af47c08bb9a0c0beabef609bba20.
Now I could do
% git-checkout master configure.in
in the gpm-2-dev branch and manually compare it with diff.
But - you guessed it - is not what I want.
I really think git can do that, but currently I do not see the right
way. So any idea on how to do that?
Sincerly
Nico
P.S.: Please cc on reply.
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-06 12:24 How to compare different files in different branches Nico -telmich- Schottelius
@ 2008-06-06 12:30 ` Jonathan del Strother
2008-06-06 12:34 ` Jakub Narebski
2008-06-06 12:35 ` Teemu Likonen
2 siblings, 0 replies; 10+ messages in thread
From: Jonathan del Strother @ 2008-06-06 12:30 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
On Fri, Jun 6, 2008 at 1:24 PM, Nico -telmich- Schottelius
<nico-git-20080606@schottelius.org> wrote:
> Hello!
>
> I want to compare 'configure.in' from the master branch with
> 'configure.ac' from the gpm-2-dev branch.
>
> What I tried:
>
> % git-diff master..gpm-2-dev configure.ac
> fatal: ambiguous argument 'configure.ac': unknown revision or path not
> in the working tree.
> Use '--' to separate paths from revisions
>
> # ok, correct, there is no configure.ac in master
> # But not what I want.
>
> % git-diff master..gpm-2-dev configure.in
>
> # shows that the file does not exist in gpm-2-dev. Correct.
> # But not what I want.
>
How about git diff master:configure.in gm-2-dev:configure.ac ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-06 12:24 How to compare different files in different branches Nico -telmich- Schottelius
2008-06-06 12:30 ` Jonathan del Strother
@ 2008-06-06 12:34 ` Jakub Narebski
2008-06-06 12:38 ` Jakub Narebski
2008-06-06 12:35 ` Teemu Likonen
2 siblings, 1 reply; 10+ messages in thread
From: Jakub Narebski @ 2008-06-06 12:34 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:
> I want to compare 'configure.in' from the master branch with
> 'configure.ac' from the gpm-2-dev branch.
[...]
> I really think git can do that, but currently I do not see the right
> way. So any idea on how to do that?
$ git diff master:configure.in gpm-2-dev:configure.ac
See "Specifying revisions" in git-rev-list(1); I think it can be also
found in other places, but I'm not sure. git-show(1) refers to this
section when describing <object> option.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-06 12:24 How to compare different files in different branches Nico -telmich- Schottelius
2008-06-06 12:30 ` Jonathan del Strother
2008-06-06 12:34 ` Jakub Narebski
@ 2008-06-06 12:35 ` Teemu Likonen
2008-06-08 9:47 ` Nico -telmich- Schottelius
2 siblings, 1 reply; 10+ messages in thread
From: Teemu Likonen @ 2008-06-06 12:35 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
Nico -telmich- Schottelius wrote (2008-06-06 14:24 +0200):
> I want to compare 'configure.in' from the master branch with
> 'configure.ac' from the gpm-2-dev branch.
You could do:
$ git diff master:configure.in gpm-2-dev:configure.ac
In general form it means:
$ git diff <commit1>:<path1> <commit2>:<path2>
You can also view directories and files similar way:
$ git show <commit>:<path>
And <commit> can be anything that refers to a commit, e.g. a branch
name, a tag, SHA1 or a relative pointer like master^2~5.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-06 12:34 ` Jakub Narebski
@ 2008-06-06 12:38 ` Jakub Narebski
0 siblings, 0 replies; 10+ messages in thread
From: Jakub Narebski @ 2008-06-06 12:38 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:
>
> > I want to compare 'configure.in' from the master branch with
> > 'configure.ac' from the gpm-2-dev branch.
> [...]
> > I really think git can do that, but currently I do not see the right
> > way. So any idea on how to do that?
>
> $ git diff master:configure.in gpm-2-dev:configure.ac
$ git diff -M master gpm-2-dev -- configure.in configure.ac
should also work.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-06 12:35 ` Teemu Likonen
@ 2008-06-08 9:47 ` Nico -telmich- Schottelius
2008-06-08 9:51 ` Junio C Hamano
0 siblings, 1 reply; 10+ messages in thread
From: Nico -telmich- Schottelius @ 2008-06-08 9:47 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
Thank you all for your fast answers!
I must confess I've overseen -M, as I saw --no-renames and searched
for --renames.
Teemu Likonen [Fri, Jun 06, 2008 at 03:35:39PM +0300]:
> Nico -telmich- Schottelius wrote (2008-06-06 14:24 +0200):
> [...]
> In general form it means:
>
> $ git diff <commit1>:<path1> <commit2>:<path2>
> [...]
Very nice syntax, somehow guessed that this is available, but didn't
try... my fault.
Perhaps we should reference git-rev-list(1) from git-diff(1), too?
Sincerly
Nico
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-08 9:47 ` Nico -telmich- Schottelius
@ 2008-06-08 9:51 ` Junio C Hamano
2008-06-15 1:49 ` Ask Bjørn Hansen
2008-06-16 12:21 ` git-svn breaks svn when adding .svn Nico -telmich- Schottelius
0 siblings, 2 replies; 10+ messages in thread
From: Junio C Hamano @ 2008-06-08 9:51 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:
> Very nice syntax, somehow guessed that this is available, but didn't
> try... my fault.
>
> Perhaps we should reference git-rev-list(1) from git-diff(1), too?
This is just the standard syntax to name blob _anywhere_, so we should not
hide it in git-rev-list(1) but somewhere people would read before reading
any "technical manual" material, perhaps in the tutorial and git(1).
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to compare different files in different branches
2008-06-08 9:51 ` Junio C Hamano
@ 2008-06-15 1:49 ` Ask Bjørn Hansen
2008-06-16 12:21 ` git-svn breaks svn when adding .svn Nico -telmich- Schottelius
1 sibling, 0 replies; 10+ messages in thread
From: Ask Bjørn Hansen @ 2008-06-15 1:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nico -telmich- Schottelius, git
On Jun 8, 2008, at 2:51, Junio C Hamano wrote:
>> Perhaps we should reference git-rev-list(1) from git-diff(1), too?
>
> This is just the standard syntax to name blob _anywhere_, so we
> should not
> hide it in git-rev-list(1) but somewhere people would read before
> reading
> any "technical manual" material, perhaps in the tutorial and git(1).
+1! A "how to specify files and revisions" tutorial with tips,
tricks and examples would be great.
Since it's much more powerful in git than in other SCMs, this is one
of the larger bits of things to learn.
- ask
--
http://develooper.com/ - http://askask.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* git-svn breaks svn when adding .svn
2008-06-08 9:51 ` Junio C Hamano
2008-06-15 1:49 ` Ask Bjørn Hansen
@ 2008-06-16 12:21 ` Nico -telmich- Schottelius
[not found] ` <200806161603.05166.thomas@koch.ro>
1 sibling, 1 reply; 10+ messages in thread
From: Nico -telmich- Schottelius @ 2008-06-16 12:21 UTC (permalink / raw)
To: git; +Cc: Frederik Dohr
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
Hello dear git list!
The following information was submitted to me by Frederik and is forwarded to
the list, because he's no mail access right now:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Using "git-svn dcommit", files or folders named ".svn" can be committed to the Subversion repository.
This breaks the SVN repo - e.g. "svn update" results in the following error:
svn: Failed to add directory '.svn': object of the same name already exists
Ideally, the SVN server would reject such a commit.
However, if I interpret the following issues correctly, Subversion doesn't want to handle this server-side:
http://subversion.tigris.org/issues/show_bug.cgi?id=1068
(also: http://subversion.tigris.org/issues/show_bug.cgi?id=1065)
Since this is potentially a very critical issue, I suggest git-svn dcommit check and filter for such occurrences.
Alternatively, a prominent warning could be added to the relevant git-svn commands.
Details:
git version 1.5.4.3
svn version 1.4.6 (r28521)
Plattform: Ubuntu 8.04 Hardy Heron
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sincerly
Nico
PS: Please CC him and me on reply.
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn breaks svn when adding .svn
[not found] ` <200806161603.05166.thomas@koch.ro>
@ 2008-06-16 16:09 ` Frederik Dohr
0 siblings, 0 replies; 10+ messages in thread
From: Frederik Dohr @ 2008-06-16 16:09 UTC (permalink / raw)
To: git; +Cc: Nico -telmich- Schottelius
> I've reported the exact same problem on 18.04.08 under the subject: "git svn
> should refuse to checkin .svn directories"
Sorry about that - I did search the archives before having this
posted, but that didn't come up with anything (the search
functionality is quite limited though).
>> [...] Add this as the
>> pre-commit hook in .git/hooks (make sure to make it executable).
Not a bad idea - but this still requires manual intervention (and thus
awareness), which doesn't solve the potential destructiveness of this
issue.
> The Git website seems to be currently down, but one of us should search, if
> there is a Bugtracker for GIT and then open an issue for this.
The website is up again.
However, there doesn't seem to be a dedicated bug tracking tool.
-- F.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-06-16 16:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06 12:24 How to compare different files in different branches Nico -telmich- Schottelius
2008-06-06 12:30 ` Jonathan del Strother
2008-06-06 12:34 ` Jakub Narebski
2008-06-06 12:38 ` Jakub Narebski
2008-06-06 12:35 ` Teemu Likonen
2008-06-08 9:47 ` Nico -telmich- Schottelius
2008-06-08 9:51 ` Junio C Hamano
2008-06-15 1:49 ` Ask Bjørn Hansen
2008-06-16 12:21 ` git-svn breaks svn when adding .svn Nico -telmich- Schottelius
[not found] ` <200806161603.05166.thomas@koch.ro>
2008-06-16 16:09 ` Frederik Dohr
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).