All of lore.kernel.org
 help / color / mirror / Atom feed
* Rewriting git-repack.sh in C
@ 2013-08-02 13:48 Stefan Beller
  2013-08-02 14:10 ` Duy Nguyen
  2013-08-05 10:34 ` Rewriting git-repack.sh in C Matthieu Moy
  0 siblings, 2 replies; 17+ messages in thread
From: Stefan Beller @ 2013-08-02 13:48 UTC (permalink / raw)
  To: GIT Mailing-list

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

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 approach such a plumbing command?

I don't think just calling cmd_pack_objects(argc, **argv) would 
be the right thing to do, as we're not using all the command 
line parameters, so some of the logic in cmd_pack_object could 
be skipped.
Another approach would be to use some of the functions as used 
by cmd_pack_objects, but these mostly reside in builtin/pack_objects.c
They'd need to be moved up to pack.h/pack.c.

So my question is, how you'd generally approach rewriting a 
shell script in C.

Stefan






[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-08-08  6:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-02 13:48 Rewriting git-repack.sh in C Stefan Beller
2013-08-02 14:10 ` Duy Nguyen
2013-08-02 16:36   ` Duy Nguyen
2013-08-03  6:33   ` Fredrik Gustafsson
2013-08-03 10:03     ` Duy Nguyen
2013-08-07 14:00       ` [PATCH 0/4] " Stefan Beller
2013-08-07 14:00         ` [PATCH 1/4] Build in git-repack Stefan Beller
2013-08-07 14:28           ` Matthieu Moy
2013-08-07 15:48             ` Junio C Hamano
2013-08-07 16:45               ` Stefan Beller
2013-08-08  2:44               ` Duy Nguyen
2013-08-07 14:00         ` [PATCH 2/4] backup_file dummy function Stefan Beller
2013-08-08  2:45           ` Duy Nguyen
2013-08-07 14:00         ` [PATCH 3/4] pack-objects: do not print usage when repacking Stefan Beller
2013-08-08  6:40           ` Antoine Pelisse
2013-08-07 14:00         ` [PATCH 4/4] repack: add unpack-unreachable Stefan Beller
2013-08-05 10:34 ` Rewriting git-repack.sh in C Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.