[PATCH 0/4] Re: Rewriting git-repack.sh in C

2013-08-07 Thread Stefan Beller
Hi Duy, I applied your patch on the current master and added 3 patches, so git compiles and the testsuite works without additional breakages. The functionality is obviously not yet completed as the backup_file function is still empty. What do you intend that function will do? Stefan Nguyễn Thá

Re: Rewriting git-repack.sh in C

2013-08-05 Thread Matthieu Moy
Stefan Beller writes: > Hello, > > I'd like to rewrite the repack shell script in C. > So I tried the naive approach reading the man page and > the script itself and write C program by matching each block/line > of the script with a function in C You should add one step here: check that tests

Re: Rewriting git-repack.sh in C

2013-08-03 Thread Duy Nguyen
On Sat, Aug 3, 2013 at 1:33 PM, Fredrik Gustafsson wrote: > On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: >> > So my question is, how you'd generally approach rewriting a >> > shell script in C. >> >> Start a new process via start_command/run_command interface. It's >> safer to retai

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Fredrik Gustafsson
On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: > > So my question is, how you'd generally approach rewriting a > > shell script in C. > > Start a new process via start_command/run_command interface. It's > safer to retain the process boundary at this stage. You can try to > integrate

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Duy Nguyen
On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: > On Fri, Aug 2, 2013 at 8:48 PM, Stefan Beller > wrote: > > Hello, > > > > I'd like to rewrite the repack shell script in C. > > So I tried the naive approach reading the man page and > > the script itself and write C program by matching

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Duy Nguyen
On Fri, Aug 2, 2013 at 8:48 PM, Stefan Beller wrote: > Hello, > > I'd like to rewrite the repack shell script in C. > So I tried the naive approach reading the man page and > the script itself and write C program by matching each block/line > of the script with a function in C > > Now I stumble up

Rewriting git-repack.sh in C

2013-08-02 Thread Stefan Beller
Hello, I'd like to rewrite the repack shell script in C. So I tried the naive approach reading the man page and the script itself and write C program by matching each block/line of the script with a function in C Now I stumble upon other git commands (git pack-objects). What's the best way to a