How do I create a patch

2,176 views
Skip to first unread message

John Emmas

unread,
May 24, 2012, 12:50:50 PM5/24/12
to tortoisegit-users
Having installed TortoiseGit and used it to join some Git projects,
how do I create a ptch to send to someone else?

If I click on the file I modified I can select the 'Diff' option and
do it that way. That's fine - but it only seems to work for a single
file. If I've edited several files in different folders I can't seem
to just click on the master root folder and create an overall diff of
everything (in that situation, 'Diff' simply lists the files that I
changed). Clicking on several files and hitting 'Save unified diff"
does display a diff - but without any option to save it to a file!

So not admitting defeat, I decided to try the option "Create patch
serial". That seems to do something and says "Success" at the end -
but I've no idea what it did. It certainly didn't create any files :-(

What am I not understanding???

gwfung

unread,
May 25, 2012, 8:23:39 AM5/25/12
to tortoisegit-users
I have used Create Patch serial before. It asks me for a directory to
store the patch files, and how many commits to do. It will then
create a patch file for each commit. I think it goes from the commit
you right clicked on, for how many you specify.

I hope this helps!
Greg

John Emmas

unread,
May 26, 2012, 3:53:39 AM5/26/12
to tortoisegit-users
Thanks Greg - but what happens if I only have read access to the
repository? I can't commit upstream AFAIK (I'm assuming that 'commit'
means the same thing here as it means for subversion?)

To be honest, if this works at all, it's incredibly unintuitive.
AFAICT I can view a diff for multiple files - but I can only save
diffs for one file at a time. This is next to useless. Creating a
patch serial doesn't work at all in my version (TortoiseGit 1.7.9,
using git version 1.7.10). If I click on a modified file, I don't even
see the option to create a patch. I only see that option when I click
on a folder - but even then, nothing ever gets created.

I'd strongly recommend the developers to look at TortoiseSVN. Patches
and diffs are much more intuitive in TortoiseSVN.

John

John Emmas

unread,
May 26, 2012, 4:19:21 AM5/26/12
to tortoisegit-users
Addendum to the above:

I just realised that in the dialog box that appears after I select
'Create patch serial', there's a group of controls labelled
"Version" (what does "Version" mean in this context??) Anyway, if I
select the radio button labelled "Number Commits" this does produce a
patch in the stated folder. HOWEVER.... what I get is apparently a
patch that's been created by somebody else (maybe it's a patch showing
the changes since my last 'Pull'??) Whatever it is, it isn't what I
would call "creating a patch". In fact if anything, 'Create patch'
appeared to APPLY a patch -so (thinking that maybe 'Create patch' and
'Apply patch' are the wrong way around) I attempted to create a patch
by using "Apply patch serial" - but that didn't work either, from what
I could tell.

Which brings me back to my original question... how do I create a
patch (of any changes that I'VE made) so that somebody else can apply
my changes?

gwfung

unread,
May 26, 2012, 10:25:20 PM5/26/12
to tortoisegit-users
I'm on vacation and don't have git here, but I didn't find it hard to
do this...

Are you right clicking the commit from the tree with all the commit
history (show log dialog), or are you right clicking a certain file
name wiithin that? I've done patch files for multiple source files
before.

After you get going with git, it is way more powerful than SVN, but
mercurial is easier to get started with.

Greg

John Emmas

unread,
May 27, 2012, 3:50:58 AM5/27/12
to tortoisegit-users
>
> Are you right clicking the commit from the tree with all the commit
> history (show log dialog), or are you right clicking a certain file
> name wiithin that?
>
Thanks for helping me with this Greg but I wonder if we're at crossed
purposes? Firstly, what OS are you using? I'm using TortoiseGit with
Windows where (I believe) it's a shell extension, just like
TortoiseSVN. So to make it work, all you need to do is open Windows
Explorer and click on the file(s) you want to work with. You're right
to say that a lot of the same functionality is available from within
the Log dialog - but either way, Git only seems to let me to create
patches for stuff that's already been committed.

Here's the scenario... I'm working in the UK on a project that uses
libraptor (among others). My programming colleagues are mostly in the
USA. AFAIK none of us has write access to raptor's Git repository. We
can check stuff out but if we need to change anything in the code, we
can't check our changes in. Our access privileges are read-only (as I
understand it). So if I make a change locally which I need to give to
my colleagues in the USA, how do I do that? It looks as if Git will
only allow you to create patches for stuff which you (or some else)
has commited upstream.

Or.... does "commit" mean something diffirent in Git? In subversion,
"commit" means sending your changes upstream where they get included
in the main code repo. With subversion, you can create patches and
diffs regardless of whether you've committed your changes or not. But
that doesn't seem to be the same for Git. Is that the crucial
difference?

John

Sven Strickroth

unread,
May 27, 2012, 7:22:58 AM5/27/12
to tortoisegit-users
John Emmas schrieb:
> Or.... does "commit" mean something diffirent in Git? In subversion,
> "commit" means sending your changes upstream where they get included
> in the main code repo. With subversion, you can create patches and
> diffs regardless of whether you've committed your changes or not. But
> that doesn't seem to be the same for Git. Is that the crucial
> difference?

Yes, Git works completely different to Subversion (git is
distributed). When you commit, you do not commit upstream - all
changes are local.

In subversion you checkout just the files of a repository, in git you
complete clone it (you can think of it like a fork). You get a full
copy to your local machine - you can work offline to commit, view log
and so on. When you want to provide others your changes, you have to
push them or create patches. Also when you want to get the latest
changes of the upstream guys you have to pull changes.

PS: Nice video about the design of git: http://www.youtube.com/watch?v=4XpnKHJAok8,
not a howto, but there are other howto videos.

Sven Strickroth

unread,
May 27, 2012, 7:30:06 AM5/27/12
to tortoisegit-users
John Emmas schrieb:
> Which brings me back to my original question... how do I create a
> patch (of any changes that I'VE made) so that somebody else can apply
> my changes?

When you do not want to commit your changes (however, you should
commit your changes (in small logical pieces)), you have different
options (with the latest version of TortoiseGit):

- Go to "Create patch serial" and click on "Save unified diff since
HEAD"
- Click the same button on the "Check for modifications" dialog
- Or diff a file from the Commit, Log or Check for modifications, left
click and save as unified diff.

After a clone in git, you have your own local branch. You can commit
there locally. See my other posting about this.

John Emmas

unread,
May 27, 2012, 3:13:56 PM5/27/12
to tortoisegit-users
Thanks Sven. That video was very helpful in explaining the basic
concepts of Git and the differences with Subversion, for example.
Between you and Greg I think I now have a much better udnerstanding
and have even managed (finallly!) to produce a patch..!

Thanks to you both.

John

John Emmas

unread,
May 28, 2012, 1:32:19 AM5/28/12
to tortoisegit-users
Drat... I spoke too soon !

Although I managed to make a patch, it failed when my colleague tried
to apply it. The patch itself couldn't possibly be simpler - it only
changes one line of code!

I've provided the TortoiseGit output below (although I could provide
the patch too, if that would help).

BTW - should this user group be sending me emails whenever someone
replies to my post? I need to check manually here several times per
day which is quite annoying.

John


FAILURE TEXT FOLLOWS:-
git.exe am --3way --ignore-space-change --keep-cr "F:\+GTK-SOURCES\gnu-
win32\src\raptor2\0001-include-change-to-make-raptor-compile-on-
Windows.patch"
Dirty index: cannot apply patches (dirty: win32/Debug/bin/raptor2D.dll
win32/Debug/ntriples_parse.obj
win32/Debug/raptor2/BuildLog.htm
win32/Debug/raptor2/mt.dep
win32/Debug/raptor2/ntriples_parse.sbr
win32/Debug/raptor2/raptor.bsc
win32/Debug/raptor2/raptor2D.dll
win32/Debug/raptor2/raptor2D.dll.intermediate.manifest
win32/Debug/raptor2/raptor2D.exp
win32/Debug/raptor2/raptor2D.lib
win32/Debug/raptor2/raptor2D.pdb
win32/Debug/raptor2/raptor_general.sbr
win32/Debug/raptor2/raptor_iostream.sbr
win32/Debug/raptor2/raptor_libxml.sbr
win32/Debug/raptor2/raptor_locator.sbr
win32/Debug/raptor2/raptor_namespace.sbr
win32/Debug/raptor2/raptor_parse.sbr
win32/Debug/raptor2/raptor_qname.sbr
win32/Debug/raptor2/raptor_rdfxml.sbr
win32/Debug/raptor2/raptor_rfc2396.sbr
win32/Debug/raptor2/raptor_rss.sbr
win32/Debug/raptor2/raptor_sax2.sbr
win32/Debug/raptor2/raptor_sequence.sbr
win32/Debug/raptor2/raptor_serialize.sbr
win32/Debug/raptor2/raptor_set.sbr
win32/Debug/raptor2/raptor_stringbuffer.sbr
win32/Debug/raptor2/raptor_uri.sbr
win32/Debug/raptor2/raptor_win32.sbr
win32/Debug/raptor2/raptor_www.sbr
win32/Debug/raptor2/raptor_www_curl.sbr
win32/Debug/raptor2/raptor_www_libfetch.sbr
win32/Debug/raptor2/raptor_www_libxml.sbr
win32/Debug/raptor2/raptor_xml.sbr
win32/Debug/raptor2/raptor_xml_writer.sbr
win32/Debug/raptor2/strcasecmp.sbr
win32/Debug/raptor_abbrev.obj
win32/Debug/raptor_avltree.obj
win32/Debug/raptor_concepts.obj
win32/Debug/raptor_general.obj
win32/Debug/raptor_grddl.obj
win32/Debug/raptor_guess.obj
win32/Debug/raptor_iostream.obj
win32/Debug/raptor_json_writer.obj
win32/Debug/raptor_libxml.obj
win32/Debug/raptor_locator.obj
win32/Debug/raptor_log.obj
win32/Debug/raptor_memstr.obj
win32/Debug/raptor_namespace.obj
win32/Debug/raptor_option.obj
win32/Debug/raptor_parse.obj
win32/Debug/raptor_qname.obj
win32/Debug/raptor_rdfxml.obj
win32/Debug/raptor_rfc2396.obj
win32/Debug/raptor_rss.obj
win32/Debug/raptor_rss_common.obj
win32/Debug/raptor_sax2.obj
win32/Debug/raptor_sequence.obj
win32/Debug/raptor_serialize.obj
win32/Debug/raptor_serialize_json.obj
win32/Debug/raptor_serialize_ntriples.obj
win32/Debug/raptor_serialize_rdfxml.obj
win32/Debug/raptor_serialize_rdfxmla.obj
win32/Debug/raptor_serialize_rss.obj
win32/Debug/raptor_serialize_turtle.obj
win32/Debug/raptor_set.obj
win32/Debug/raptor_statement.obj
win32/Debug/raptor_stringbuffer.obj
win32/Debug/raptor_syntax_description.obj
win32/Debug/raptor_term.obj
win32/Debug/raptor_turtle_writer.obj
win32/Debug/raptor_unicode.obj
win32/Debug/raptor_uri.obj
win32/Debug/raptor_win32.obj
win32/Debug/raptor_www.obj
win32/Debug/raptor_www_curl.obj
win32/Debug/raptor_www_libfetch.obj
win32/Debug/raptor_www_libxml.obj
win32/Debug/raptor_xml.obj
win32/Debug/raptor_xml_writer.obj
win32/Debug/snprintf.obj
win32/Debug/strcasecmp.obj
win32/Debug/turtle_common.obj
win32/Debug/turtle_lexer.obj
win32/Debug/turtle_parser.obj
win32/Debug/vc80.idb
win32/Debug/vc80.pdb
win32/Release/bin/raptor2.dll
win32/Release/ntriples_parse.obj
win32/Release/raptor2/BuildLog.htm
win32/Release/raptor2/mt.dep
win32/Release/raptor2/raptor2.dll
win32/Release/raptor2/raptor2.dll.intermediate.manifest
win32/Release/raptor2/raptor2.exp
win32/Release/raptor2/raptor2.lib
win32/Release/raptor_abbrev.obj
win32/Release/raptor_avltree.obj
win32/Release/raptor_concepts.obj
win32/Release/raptor_general.obj
win32/Release/raptor_grddl.obj
win32/Release/raptor_guess.obj
win32/Release/raptor_iostream.obj
win32/Release/raptor_json_writer.obj
win32/Release/raptor_libxml.obj
win32/Release/raptor_locator.obj
win32/Release/raptor_log.obj
win32/Release/raptor_memstr.obj
win32/Release/raptor_namespace.obj
win32/Release/raptor_option.obj
win32/Release/raptor_parse.obj
win32/Release/raptor_qname.obj
win32/Release/raptor_rdfxml.obj
win32/Release/raptor_rfc2396.obj
win32/Release/raptor_rss.obj
win32/Release/raptor_rss_common.obj
win32/Release/raptor_sax2.obj
win32/Release/raptor_sequence.obj
win32/Release/raptor_serialize.obj
win32/Release/raptor_serialize_json.obj
win32/Release/raptor_serialize_ntriples.obj
win32/Release/raptor_serialize_rdfxml.obj
win32/Release/raptor_serialize_rdfxmla.obj
win32/Release/raptor_serialize_rss.obj
win32/Release/raptor_serialize_turtle.obj
win32/Release/raptor_set.obj
win32/Release/raptor_statement.obj
win32/Release/raptor_stringbuffer.obj
win32/Release/raptor_syntax_description.obj
win32/Release/raptor_term.obj
win32/Release/raptor_turtle_writer.obj
win32/Release/raptor_unicode.obj
win32/Release/raptor_uri.obj
win32/Release/raptor_win32.obj
win32/Release/raptor_www.obj
win32/Release/raptor_www_curl.obj
win32/Release/raptor_www_libfetch.obj
win32/Release/raptor_www_libxml.obj
win32/Release/raptor_xml.obj
win32/Release/raptor_xml_writer.obj
win32/Release/snprintf.obj
win32/Release/strcasecmp.obj
win32/Release/turtle_common.obj
win32/Release/turtle_lexer.obj
win32/Release/turtle_parser.obj
win32/Release/vc80.idb
win32/Release/vc80.pdb
win32/raptor.ncb
win32/raptor.suo
win32/raptor.vcproj.LAPTOP6400.Harrison.user)

Fail

John Emmas

unread,
May 28, 2012, 4:25:21 PM5/28/12
to tortoisegit-users
Eventually I realised what the problem was.... all those listed files
had somehow gotten added to my colleague's project and were preventing
it from accepting patches. We needed to revert his whole project
before we could continue. In one sense we were lucky - because none of
those files were files that he was working on, But by the same token,
none of them were in any way connected to my patch. The fact that one
file can somehow prevent a completely different file from accepting a
patch doesn't bode well for the future. Suppose we'd both been working
on this project at the same time? I'm not sure that either of us would
have been able to accept the other one's patches!

John Emmas

unread,
Jan 13, 2013, 10:26:53 AM1/13/13
to tortoisegit-users
I first installed TortoiseGit (on Windows 7) around 8 months ago when it was then at version 1.7.9. I only use it very rarely but today I needed to create a unified diff file for someone. I quickly realised that the options "Save unified diff" and "Show changes as unified diff" have stopped working. All that happens is that a blank window pops up very briefly (for about 0.5 secs) and then disappears again. I do know that this worked in the past - because back in May, I posted a problem here which described opening the Unified Diff window and being able to see its contents.

My first approach to this problem was to run the MSI installer again and choose the "Repair" option. However, that didn't change anything. I then uninstalled v1.7.9 and re-installed (again without success). I then tried updating to v1.7.15 (initially without uninstalling 1.7.9) which didn't work either. Finally, I've completely uninstalled and re-installed v1.7.15 - but nothing works.

Has anyone else reported problems with the Unified Diff window not appearing properly? As I've said, it did work when I first installed v1.7.9.

John Emmas.

John Emmas

unread,
Jan 13, 2013, 12:58:43 PM1/13/13
to tortoisegit-users

On 13 Jan 2013, at 15:26, John Emmas wrote:

> I first installed TortoiseGit (on Windows 7) around 8 months ago when it was then at version 1.7.9. I only use it very rarely but today I needed to create a unified diff file for someone. I quickly realised that the options "Save unified diff" and "Show changes as unified diff" have stopped working. All that happens is that a blank window pops up very briefly (for about 0.5 secs) and then disappears again. I do know that this worked in the past - because back in May, I posted a problem here which described opening the Unified Diff window and being able to see its contents.
>

A bit more information... I just realised that I seem to have installed Tortoise MsysGit at some point - though I don't remember why. However, it would definitely have been _after_ my initial TortoiseGit install. Are the two of them incompatible maybe?

John

ch3c...@gmail.com

unread,
Jan 14, 2013, 12:40:21 AM1/14/13
to tortoise...@googlegroups.com
Can you find another PC to test with?

John Emmas於 2013年1月14日星期一UTC+8上午1時58分43秒寫道:

John Emmas

unread,
Jan 14, 2013, 1:08:53 AM1/14/13
to tortoise...@googlegroups.com
On 14 Jan 2013, at 05:40, ch3c...@gmail.com wrote:

> Can you find another PC to test with?
>
Yes, probably but I'm more concerned about why doing an uninstall and re-install doesn't fix the problem. My guess is that TortoiseGit is incompatible with something that I've installed more recently. I suspect this might be a case of "DLL Hell" - a problem which is well understood these days and largely non-existent now for other Windows programs.

John

John Emmas

unread,
Jan 14, 2013, 4:18:22 AM1/14/13
to tortoise...@googlegroups.com
This morning I uninstalled both TortoiseGit and MsysGit. Prior to downloading v1.7.15 (yesterday) I had these two installers on my system:-

Git-1.7.10-preview20120409.exe // <--- appears to be MsysGit
TortoiseGit-1.7.9.0-32bit.msi // <--- appears to be TortoiseGit

I then tried reinstalling ONLY TortoiseGit. But whenever I tried to use TortoiseGit (e.g. to view a diff for a particular source file) it just gave me a message saying that MsysGit wasn't installed and it asked me to provide the path to 'git.exe'.

So I then re-installed from Git-1.7.10-preview20120409.exe (i.e. both packages now installed) and I'm now back to the problem that I originally reported (Unified Diff window doesn't display properly).

Question... is it necessary for BOTH packages to be installed before Git works on Windows? I've never come across any other Windows app where I needed to run TWO installers before it would work.

John (confused...)

Frank Li

unread,
Jan 15, 2013, 11:42:55 PM1/15/13
to tortoise...@googlegroups.com
2013/1/14 John Emmas <joh...@tiscali.co.uk>:
> .e. both packages now installed) and I'm now back to the problem that I originally reported (Unified Diff window doesn't display properly).
>
> Question... is it necessary for BOTH packages to be installed before Git works on Windows? I've never come across any other Windows app where I needed to run TWO installers before it would work.

Yes, Tortoisegit depend on Msysgit now.

John Emmas

unread,
Jan 16, 2013, 5:53:14 AM1/16/13
to tortoise...@googlegroups.com

On 16 Jan 2013, at 04:42, Frank Li wrote:

>
> Yes, Tortoisegit depend on Msysgit now.
>

Many thanks, Frank.

FWIW I've realised that TortoiseUDiff.exe itself appears to be working. If I run it from the command line with (say) something like this, it does work and displays the contents of the given diff file:-

"E:\Program Files\TortoiseGit\bin\TortoiseUDiff.exe" /patchfile:"path_to_a_suitable_file.diff"

So my guess is that for some strange reason, there must be something wrong in the information that TortoiseGit is sending out to it. Is there any kind of log output that I can turn on that would tell me what precisely is being sent to TortoiseUDiff.exe?

John

John Emmas

unread,
Jan 20, 2013, 3:58:28 PM1/20/13
to tortoise...@googlegroups.com
On 16 Jan 2013, at 10:53, John Emmas wrote:

>
> FWIW I've realised that TortoiseUDiff.exe itself appears to be working. If I run it from the command line with (say) something like this, it does work and displays the contents of the given diff file:-
>
> "E:\Program Files\TortoiseGit\bin\TortoiseUDiff.exe" /patchfile:"path_to_a_suitable_file.diff"
>
> So my guess is that for some strange reason, there must be something wrong in the information that TortoiseGit is sending out to it. Is there any kind of log output that I can turn on that would tell me what precisely is being sent to TortoiseUDiff.exe?
>

It looks like I'm stuck with this situation. Unified Diff seems to work if I run it from the command line but it won't work from within the normal TortoiseGit contexts (e.g. from 'Create Patch Serial' etc). I also asked for advice on the TortoiseSVN mailing list but the only advice offered was to update to the latest version, which didn't improve things.

So I'll either need to find an alternative (3rd party) Unified Diff handler - or abandon TortoiseGit altogether and find some other Git client for Windows. Can anyone suggest an alternative Diff handler (or an alternative Git client) that I could try?

John

Jacob Christ

unread,
Jan 20, 2013, 8:26:37 PM1/20/13
to tortoise...@googlegroups.com

You can always use gitk from the bash shell.

Jacob

--
You received this message because you are subscribed to the Google Groups "tortoisegit-users" group.
To post to this group, send email to tortoise...@googlegroups.com.
To unsubscribe from this group, send email to tortoisegit-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tortoisegit-users?hl=en.

Frank Li

unread,
Jan 20, 2013, 9:39:44 PM1/20/13
to tortoise...@googlegroups.com
2013/1/21 John Emmas <joh...@tiscali.co.uk>:
You can use notepad2 to show patch.

John Emmas

unread,
Jan 22, 2013, 11:01:56 AM1/22/13
to tortoise...@googlegroups.com
On 21 Jan 2013, at 02:39, Frank Li wrote:

>
> You can use notepad2 to show patch.
>

Thanks Frank.

I don't have notepad2 at my disposal but I decided to set Microsoft 'Notepad' as the viewer, just to see what would happen. Now when I try to create (or view) a Unified Diff, MS Notepad opens a window with the title PatXXXX.tmp (where XXXX is a hexadecimal number). Like TortoiseUDiff, the window is blank. Unlike TortoiseUDiff, the Notepad window stays on my screen (it doesn't instantly disappear).

I decided to take a look at some of those temporary "Pat" files. Guess what??? They're all empty! So my hunch is that the viewer is probably working correctly. I'm pretty confident about this because I can use TortoiseUDiff from a command line (i.e. with a pre-existing diff file). So changing to some alternative diff viewer (such as KDiff) probably won't help. My guess is that the fault lies with whatever actually creates the patch file (or unified diff file - whatever you want to call it). Does that also get created by TortoiseUDiff or by something else?

John

Frank Li

unread,
Jan 22, 2013, 9:16:31 PM1/22/13
to tortoise...@googlegroups.com
2013/1/23 John Emmas <joh...@tiscali.co.uk>:
patxxxx.tmp created by tortoisegit run git diff command, set output to
temp file.
I guess, tortoisegit just create a empty path file by some reason.
what's your msysgit version?

John Emmas

unread,
Jan 23, 2013, 5:06:41 AM1/23/13
to tortoise...@googlegroups.com
-------Original Message-------

From: Frank Li
Date: 23/01/2013 02:16:36
>
> I guess, tortoisegit just create a empty path file by some
> reason. what's your msysgit version?
>

I seem to have several entries in Control Panel:-

1) TortoiseGit is version 1.7.9.0 (although I also tried 1.7.15).
2) "Git" (which I assume is MsysGit) is 1.7.10-preview20120409

and for what it's worth...

3) TortoiseSVN is 1.7.11.23600

My OS is Windows 7 Ultimate (32 bit). Remember that Git worked before I
updated TortoiseSVN. TortoiseSVN was originally at revision 1.6.15.21042.
However, even if I uninstall all three products and install the ones that
previously worked, this problem refuses to go away... :-(

John

John Emmas

unread,
Jan 25, 2013, 4:01:23 AM1/25/13
to tortoise...@googlegroups.com
I've found some new information that might be very significant. One of my
git projects is Jack2:-

http://jackaudio.org/download

If I open a terminal window and cd into its root folder
(F:\+GTK-SOURCES\Jack2) I can then type this command:-

git diff windows/JackWinServerLaunch.cpp > test.diff

The result is a new Unified Diff file which shows a couple of small changes
that I made to that source file. BUT... if I DON'T cd into the root folder
and simply type this from some unrelated folder:-

git diff F:/+GTK-SOURCES/Jack2/windows/JackWinServerLaunch.cpp >
test2.diff

git gives me this error:-

usage: git [--no-index] <path> <path>

and no Unified Diff file gets created. My guess is that MsysGit is probably
working but either (a) TortoiseGit is sending it the wrong information - or
(b) TortoiseGit is failing to cd into the correct parent folder.

Does this give any clue about the problem?

John

Frank Li

unread,
Jan 25, 2013, 4:09:32 AM1/25/13
to tortoise...@googlegroups.com
2013/1/25 John Emmas <joh...@tiscali.co.uk>:
no, tortoisegit always cd to project root directory.

I think possible "+" block. Can you rename your folder?

>
> Does this give any clue about the problem?
>
> John
>
> --
> You received this message because you are subscribed to the Google Groups "tortoisegit-users" group.
> To post to this group, send email to tortoise...@googlegroups.com.
> To unsubscribe from this group, send email to tortoisegit-us...@googlegroups.com.
> Visit this group at http://groups.google.com/group/tortoisegit-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

John Emmas

unread,
Jan 25, 2013, 2:29:18 PM1/25/13
to tortoise...@googlegroups.com
On 25 Jan 2013, at 09:09, Frank Li wrote:

> 2013/1/25 John Emmas <joh...@tiscali.co.uk>:
>>
>> if I DON'T cd into the root folder
>> and simply type this from some unrelated folder:-
>>
>> git diff F:/+GTK-SOURCES/Jack2/windows/JackWinServerLaunch.cpp > test2.diff
>>
>> git gives me this error
>>
>
> I think possible "+" block. Can you rename your folder?
>

It was worth a guess and I did try removing the '+' sign but it didn't help. Here's what we know for sure:-

1) MsysGit will produce a Unified Diff file if I run it from the command line.
2) TortoiseUDiff.exe will display a Unified Diff file if I run it from the command line.
3) But if I try the Unified Diff options from TortoiseGit's context menu, the created diff file is always empty.

To me,this suggests either a problem with the current working directory - or a problem with the command line that MsysGit receives. Is there no way that MsysGit can generate a log file so I can see what's getting sent to it?

If not, I guess I could create a small temporary app called 'git.exe' which just prints out whatever gets sent to it.

John
Reply all
Reply to author
Forward
0 new messages