top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

slow process of post-receive script on a remote (samba) share in GIT

0 votes
258 views

I am using Git bash from version 1.8.3.msysgit.0, on a Windows 7x64 PC. I have an issue with executing git push if I have a post-receive script configured.
The content of the script is not really important, as if I have a script that contains only commented out lines (around 70 lines), my git push command is delayed with around 5 seconds.
I`ve tested the script on another PC and it is working fine. No delay at all. So there are some issues on my PC regarding how git processes remote scripts.
I took a wireshark trace with 2 scenarios on my PC:

 1. just execute `cat     
    post-receive` command in the git bash
 2. did a `real` git push

Results of the wireshark traces shows:

 1. Read AndX Request, FID: 0x228f, 1024 bytes at offset 0 (1024 bytes at time, always)
 2. Read AndX Request, FID: 0x21c9, 1 byte at offset 0 (1 byte, always)

Conclusion:
git push command reads the post-receive script in 1 byte chunks, which dramatically slows down the execution process.

If more information is required about my setup or configuration, I will provided it happily, but I think this 1 byte read is the main reason for the issue.

Has anyone seen something similar? Or have any clues what is going on?

posted Jun 13, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

How to configure a read-only copy of a remote Git repository on a local server in bare mode and automatically synchronize its contents.

I need to configure a mirror of the repository hosted at another location and the mirrored repository should automatically perform syncing of code at regular intervals.

+1 vote

It is so slow that i started hating git (for wrong reasons)i'm sure there is a way out, please help me to make my git faster.

0 votes

I work on some files and push/merge them to the remote server. Sometimes I get merge conflicts on those files and have to fix them. That's completely fine. I get that.

What I don't understand is that sometimes during this process I will get merge conflicts in files _I have never touched_. In fact they are in a completely different series of directories to the one I am working on and someone else project entirely. How am I meant to know how to fix these? I dont know what the other developer wanted to do and if they have done it right.

I thought git only merged/pushed the files you have changed? If someone else has changed Group A files on the remote repo, why must I change my local Group A files when I am _pushing _completely different set of Group B files?

Sure, Id understand if I were pulling files down to my local and had to resolve merge conflicts then, but this isn't happening when I push the files up.

Any help or advice is much appreciated. Sorry if I sound frustrated - I am really trying hard to get my head round this whole git thing but its just so weird.

+1 vote

Is it possible to make a git remote pack its repository on every push?

I have tried setting gc.auto to 1 on both the remote and the clients, but so far no push seems to have packed anything.

Do I need to create a push hook on the remote to make it pack?

The reason for this is that I have several git repositorier for org-mode files.

Having a history, and rollback of the history, is more important than having a good history.

The diff of each push is small, the repositories only contain one, or a handful of org-mode files, and some of the org-mode files are quite large.

The remote is git 1:2.1.4-2.1 (debian packge, git --version reports 2.1.4), running on debian 8.0 "jessie".

The clients are various GNU/linux git (whatever comes with the distro out of the box) and Win32 msysgit installations.

...