# Re: Change in git-svn dcommit semantics?

13 messages from 2006-12-19 to 2006-12-22. Participants: Brian Gernhardt, Jakub Narebski, Seth Falcon, Johannes Schindelin, Jeff King, Eric Wong, Junio C Hamano.
Thread: https://gitlist.dev/t/6081

## Seth Falcon, 2006-12-19 21:12

Subject: Change in git-svn dcommit semantics?
Message-ID: <m2mz5jegka.fsf@ziti.local>
URL: https://gitlist.dev/e/m2mz5jegka.fsf%40ziti.local

```
Hi Eric,

I just updated to the latest git/git-svn (on branch 'master') and the
workflow I've been using no longer seems to work:

   # review the commits I'm going to send to svn
   ziti:~/proj/bioc-2.0-git seth$ git log remotes/git-svn..HEAD
   
   # now send them
   ziti:~/proj/bioc-2.0-git seth$ git svn dcommit remotes/git-svn..HEAD

   fatal: ambiguous argument
   'refs/remotes/git-svn..remotes/git-svn..HEAD': unknown revision or
   path not in the working tree.  Use '--' to separate paths from
   revisions 32768 at /Users/seth/scm/bin/git-svn line 2190
           main::safe_qx('git-rev-list', '--no-merges', 'refs/remotes/git-svn..remotes/git-svn..HEAD') called at /Users/seth/scm/bin/git-svn line 610
           main::dcommit('remotes/git-svn..HEAD') called at /Users/seth/scm/bin/git-svn line 197


At this point, my last commit seems to have been reset (although the
changes are thankfully still in my working tree).  If this happens to
you, you can recover the last commit like:

  git commit -a -v -c ORIG_HEAD

And it seems that the new interface requires no extra args:

 git svn dcommit

The new interface seems ok until things like 

  git svn dcommit remotes/git-svn..HEAD~2

are allowed (if ever).  But it would be nice for the failure mode to
not undo commits :-)

+ seth

git version 1.4.4.2.gee60-dirty

```

## Eric Wong, 2006-12-19 22:09

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <20061219220900.GA3148@localdomain>
URL: https://gitlist.dev/e/20061219220900.GA3148%40localdomain
In-Reply-To: <m2mz5jegka.fsf@ziti.local>

```
Seth Falcon <sethfalcon@gmail.com> wrote:
> Hi Eric,
> 
> I just updated to the latest git/git-svn (on branch 'master') and the
> workflow I've been using no longer seems to work:
> 
>    # review the commits I'm going to send to svn
>    ziti:~/proj/bioc-2.0-git seth$ git log remotes/git-svn..HEAD
>    
>    # now send them
>    ziti:~/proj/bioc-2.0-git seth$ git svn dcommit remotes/git-svn..HEAD
> 
>    fatal: ambiguous argument
>    'refs/remotes/git-svn..remotes/git-svn..HEAD': unknown revision or
>    path not in the working tree.  Use '--' to separate paths from
>    revisions 32768 at /Users/seth/scm/bin/git-svn line 2190
>            main::safe_qx('git-rev-list', '--no-merges', 'refs/remotes/git-svn..remotes/git-svn..HEAD') called at /Users/seth/scm/bin/git-svn line 610
>            main::dcommit('remotes/git-svn..HEAD') called at /Users/seth/scm/bin/git-svn line 197
> 
> 
> At this point, my last commit seems to have been reset (although the
> changes are thankfully still in my working tree).  If this happens to
> you, you can recover the last commit like:
> 
>   git commit -a -v -c ORIG_HEAD

Huh?  safe_qx should've croaked or died, causing git-svn to exit before
it could do any damage (via git-reset or git-rebase).  dcommit is not
called inside any eval blocks, either...

> And it seems that the new interface requires no extra args:
> 
>  git svn dcommit
> 
> The new interface seems ok until things like 
> 
>   git svn dcommit remotes/git-svn..HEAD~2
> 
> are allowed (if ever).  But it would be nice for the failure mode to
> not undo commits :-)
 
Before, the 'remotes/git-svn..HEAD' argument meant absolutely nothing to
dcommit (it silently ignored it).  Nowadays, you only need 'HEAD~2', the
'remotes/git-svn..' is already implied.

	git-svn dcommit HEAD~2

Not specifying any argument implies that it is called with 'HEAD'

-- 

```

## Brian Gernhardt, 2006-12-19 23:02

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <94FF72E0-F8BD-4773-803E-F179754BF0ED@silverinsanity.com>
URL: https://gitlist.dev/e/94FF72E0-F8BD-4773-803E-F179754BF0ED%40silverinsanity.com
In-Reply-To: <m2mz5jegka.fsf@ziti.local>

```

On Dec 19, 2006, at 4:12 PM, Seth Falcon wrote:

> git version 1.4.4.2.gee60-dirty
> (the dirty is a hand edit to Makefile for prefix)

Just FYI:  You can save Makefile variables in a "config.mak" file  
instead of having to dirty your working tree (and dealing with  
conflicts, etc).  For example:

cat > config.mak <<EOF
prefix=/your/prefix/path/here/
EOF

Mine also has a few variables like "COLLISION_CHECK=paranoid" and my  
own prefix.


```

## Johannes Schindelin, 2006-12-19 23:57

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <Pine.LNX.4.63.0612200053550.19693@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0612200053550.19693%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <94FF72E0-F8BD-4773-803E-F179754BF0ED@silverinsanity.com>

```
Hi,

On Tue, 19 Dec 2006, Brian Gernhardt wrote:

> Mine also has a few variables like "COLLISION_CHECK=paranoid" and my own 
> prefix.

Just to wake sleeping tigers: have you done a "grep COLLISION_CHECK *" 
recently (where recently means any date after May 3rd, 2005)?

Ciao,
Dscho

```

## Brian Gernhardt, 2006-12-20 00:38

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <C2881A17-27F7-467C-B353-189BB7DBFD1E@silverinsanity.com>
URL: https://gitlist.dev/e/C2881A17-27F7-467C-B353-189BB7DBFD1E%40silverinsanity.com
In-Reply-To: <Pine.LNX.4.63.0612200053550.19693@wbgn013.biozentrum.uni-wuerzburg.de>

```

On Dec 19, 2006, at 6:57 PM, Johannes Schindelin wrote:

>> Mine also has a few variables like "COLLISION_CHECK=paranoid" and  
>> my own
>> prefix.
>
> Just to wake sleeping tigers: have you done a "grep COLLISION_CHECK *"
> recently (where recently means any date after May 3rd, 2005)?

Oh, well, that's cute.  It's a configuration option that doesn't  
touch any code at all...  Not that I really cared about the check, I  
just thought it was a nice paranoid thing to activate and I like a  
certain amount of paranoia in my SCMs.  But maybe the description  
should be removed from the Makefile then?  Or better yet, collision  
checking could be put back in?

And is there an easier way to find these things than "git rev-list  
HEAD | git diff-tree -r -s --stdin -SCOLLISION | xargs git show"?  I  
cobbled that together from poking around inside gitk (which mostly  
works in OS X, but has some issues that make me prefer the command  
line).


```

## Jakub Narebski, 2006-12-20 00:52

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <ema1ba$2u9$1@sea.gmane.org>
URL: https://gitlist.dev/e/ema1ba%242u9%241%40sea.gmane.org
In-Reply-To: <C2881A17-27F7-467C-B353-189BB7DBFD1E@silverinsanity.com>

```
Brian Gernhardt wrote:

> And is there an easier way to find these things than "git rev-list  
> HEAD | git diff-tree -r -s --stdin -SCOLLISION | xargs git show"?  I  
> cobbled that together from poking around inside gitk (which mostly  
> works in OS X, but has some issues that make me prefer the command  
> line).

git log -p -SCOLLISIONS ? 

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Junio C Hamano, 2006-12-20 01:17

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <7v3b7bnz6q.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v3b7bnz6q.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <C2881A17-27F7-467C-B353-189BB7DBFD1E@silverinsanity.com>

```
Brian Gernhardt <benji@silverinsanity.com> writes:

> And is there an easier way to find these things than "git rev-list
> HEAD | git diff-tree -r -s --stdin -SCOLLISION | xargs git show"?  I
> cobbled that together from poking around inside gitk (which mostly
> works in OS X, but has some issues that make me prefer the command
> line).

I typically do:

	git log --full-diff -p -SCOLLISION

The --full-diff option helps because it shows the diff for other
files (that do not have different number of substring COLLISION
in the pre and postimage) in the same commit as well.


```

## Seth Falcon, 2006-12-20 03:05

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <m2zm9j6zdm.fsf@ziti.local>
URL: https://gitlist.dev/e/m2zm9j6zdm.fsf%40ziti.local
In-Reply-To: <20061219220900.GA3148@localdomain>

```
Eric Wong <normalperson@yhbt.net> writes:
> Huh?  safe_qx should've croaked or died, causing git-svn to exit before
> it could do any damage (via git-reset or git-rebase).  dcommit is not
> called inside any eval blocks, either...

*shrug* weird.  Looking at the code, I don't see how I could have seen
what I think I did.  Reproducing the error in a sandbox doesn't show
the git-reset behavior.  So unless I can reproduce it, I must have
done something else funny.  Sorry for the noise.

> Before, the 'remotes/git-svn..HEAD' argument meant absolutely nothing to
> dcommit (it silently ignored it).  Nowadays, you only need 'HEAD~2', the
> 'remotes/git-svn..' is already implied.
>
> 	git-svn dcommit HEAD~2

That's convenient in that it requires less typing.  I will try to
retrain my fingers.  I'm in the habit of reviewing the commits not in
svn with:

  git log remotes/git-svn..HEAD

And then editing the command like to be 'svn dcommit' instead of log.

Cheers,

+ seth

```

## Seth Falcon, 2006-12-20 03:07

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <m2vek76z9p.fsf@ziti.local>
URL: https://gitlist.dev/e/m2vek76z9p.fsf%40ziti.local
In-Reply-To: <94FF72E0-F8BD-4773-803E-F179754BF0ED@silverinsanity.com>

```
Brian Gernhardt <benji@silverinsanity.com> writes:

> On Dec 19, 2006, at 4:12 PM, Seth Falcon wrote:
>
>> git version 1.4.4.2.gee60-dirty
>> (the dirty is a hand edit to Makefile for prefix)
>
> Just FYI:  You can save Makefile variables in a "config.mak" file
> instead of having to dirty your working tree (and dealing with
> conflicts, etc).  For example:

Hey, thanks, that's much nicer :-)


```

## Jakub Narebski, 2006-12-20 11:38

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <emb77h$cf2$1@sea.gmane.org>
URL: https://gitlist.dev/e/emb77h%24cf2%241%40sea.gmane.org
In-Reply-To: <7v3b7bnz6q.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano wrote:

> Brian Gernhardt <benji@silverinsanity.com> writes:
> 
>> And is there an easier way to find these things than "git rev-list
>> HEAD | git diff-tree -r -s --stdin -SCOLLISION | xargs git show"?  I
>> cobbled that together from poking around inside gitk (which mostly
>> works in OS X, but has some issues that make me prefer the command
>> line).
> 
> I typically do:
> 
>       git log --full-diff -p -SCOLLISION
> 
> The --full-diff option helps because it shows the diff for other
> files (that do not have different number of substring COLLISION
> in the pre and postimage) in the same commit as well.

Yet another undocumented option. Sigh...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Brian Gernhardt, 2006-12-20 11:47

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <360A3F7A-0849-4BCE-8550-1F05BB9821C5@silverinsanity.com>
URL: https://gitlist.dev/e/360A3F7A-0849-4BCE-8550-1F05BB9821C5%40silverinsanity.com
In-Reply-To: <emb77h$cf2$1@sea.gmane.org>

```

On Dec 20, 2006, at 6:38 AM, Jakub Narebski wrote:

> Junio C Hamano wrote:
>
>> The --full-diff option helps because it shows the diff for other
>> files (that do not have different number of substring COLLISION
>> in the pre and postimage) in the same commit as well.
>
> Yet another undocumented option. Sigh...

I'd send in a patch to fix that (little gnome work is what I do in  
Wikipedia, and seems to be what I do here), but the option seems to  
be in setup_revision.c:setup_revisions, which is used in several  
places.  Is there a central place to put that in the documentation?   
Should there be?


```

## Jeff King, 2006-12-20 11:57

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <20061220115731.GA29786@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20061220115731.GA29786%40coredump.intra.peff.net
In-Reply-To: <360A3F7A-0849-4BCE-8550-1F05BB9821C5@silverinsanity.com>

```
On Wed, Dec 20, 2006 at 06:47:45AM -0500, Brian Gernhardt wrote:

> >>The --full-diff option helps because it shows the diff for other
> >>files (that do not have different number of substring COLLISION
> >>in the pre and postimage) in the same commit as well.
> >
> >Yet another undocumented option. Sigh...
> 
> I'd send in a patch to fix that (little gnome work is what I do in  
> Wikipedia, and seems to be what I do here), but the option seems to  
> be in setup_revision.c:setup_revisions, which is used in several  
> places.  Is there a central place to put that in the documentation?   
> Should there be?

Please read the rest of the thread for some explanation from Junio on
how this option works.

I think it makes sense to group the porcelain-ish options together for
git-log/git-whatchanged (and potentially git-show). Really, they can
take any of the diff-options or any of the rev-list options.  The
rev-list options are not currently grouped for inclusion in another man
page. The diff options are available in diff-options.txt, but are not
included by the log manpages.  They probably should be.


```

## Brian Gernhardt, 2006-12-22 14:09

Subject: Re: Change in git-svn dcommit semantics?
Message-ID: <3EB63EEE-0F78-47CE-B94E-325A9F6817C5@silverinsanity.com>
URL: https://gitlist.dev/e/3EB63EEE-0F78-47CE-B94E-325A9F6817C5%40silverinsanity.com
In-Reply-To: <20061220115731.GA29786@coredump.intra.peff.net>

```
On Dec 20, 2006, at 6:57 AM, Jeff King wrote:

> On Wed, Dec 20, 2006 at 06:47:45AM -0500, Brian Gernhardt wrote:
>
>>>> The --full-diff option helps because it shows the diff for other
>>>> files (that do not have different number of substring COLLISION
>>>> in the pre and postimage) in the same commit as well.
>>>
>>> Yet another undocumented option. Sigh...
>>
>> I'd send in a patch to fix that (little gnome work is what I do in
>> Wikipedia, and seems to be what I do here), but the option seems to
>> be in setup_revision.c:setup_revisions, which is used in several
>> places.  Is there a central place to put that in the documentation?
>> Should there be?
>
> Please read the rest of the thread for some explanation from Junio on
> how this option works.

I was trying to write quick documentation for this option, placing it  
in Documentation/diff-options.txt (is that the right place for it?),  
when I ran across --pickaxe-all.  How do the two options differ?

~~ Brian

```
