threads / discuss / 14728

Showing changes about to be commited via git svn dcommit

Subject: Showing changes about to be commited via git svn dcommit

## tl;dr

3 messages between Jul 28, 2008 and Jul 29, 2008.

replies: 2people: 2as markdown or json

Lee Marlow· Jul 28, 2008, 22:54 UTC · lore
git-svners,

I often like to look at the diff of what I'm about to commit before taking the plunge. I'd really like an easy way to see a 'git log -p' output of what would be committed to the central svn repository with a dcommit. I found --dry-run and finally made a "one-liner" that outputs what I want, but it seems like a lot of work for something I do quite often. The one-liner I used is:

$> git svn dcommit --dry-run | grep -E '^diff-tree ' | cut -b 11- | git diff-tree --stdin -p -v

Is this the real way to do it?  Do others do something similar?
Curious and looking for a better way.
-Lee
Miklos Vajna· Jul 28, 2008, 23:53 UTC · re: Lee Marlow · lore

Re: Showing changes about to be commited via git svn dcommit

On Mon, Jul 28, 2008 at 04:54:19PM -0600, Lee Marlow <lee.marlow@gmail.com> wrote:
> $> git svn dcommit --dry-run | grep -E '^diff-tree ' | cut -b 11- |
> git diff-tree --stdin -p -v
> 
> Is this the real way to do it?  Do others do something similar?

Depends on how did you created your git-svn repo. If you have only one branch with no prefix, then I would try:

        git log git-svn..master
Lee Marlow· Jul 29, 2008, 00:32 UTC · re: Miklos Vajna · lore

Re: Showing changes about to be commited via git svn dcommit

Works perfectly and makes sense to boot!  Thanks, Miklos
-Lee
On Mon, Jul 28, 2008 at 5:53 PM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 11 quoted lines
> On Mon, Jul 28, 2008 at 04:54:19PM -0600, Lee Marlow <lee.marlow@gmail.com> wrote:
>> $> git svn dcommit --dry-run | grep -E '^diff-tree ' | cut -b 11- |
>> git diff-tree --stdin -p -v
>>
>> Is this the real way to do it?  Do others do something similar?
>
> Depends on how did you created your git-svn repo. If you have only one
> branch with no prefix, then I would try:
>
>        git log git-svn..master
>

← back to recent threads