me: "hmmm, someone posted that initial source for git. that might be fun to port to rust." me: <compiles it to try it out> bash: segfault
-
-
Replying to @steveklabnik
looks like something's getting a null pointer that it did not expect to get
3 replies 0 retweets 1 like -
Replying to @steveklabnik
https://github.com/chyojn/git-0.01/commit/b8a78d6aaecc8d8190ee559ca0687d5b18a7cdf1#diff-f0bb13c0dd1f6ca9159716c0624f0679R233 … <- null here https://github.com/chyojn/git-0.01/commit/b8a78d6aaecc8d8190ee559ca0687d5b18a7cdf1#diff-f0bb13c0dd1f6ca9159716c0624f0679R236 … <- if this if doens't fire... https://github.com/chyojn/git-0.01/commit/b8a78d6aaecc8d8190ee559ca0687d5b18a7cdf1#diff-f0bb13c0dd1f6ca9159716c0624f0679R244 … passes in null
1 reply 0 retweets 1 like -
Replying to @steveklabnik
yeah, i'm def gonna have to try this. should be fun!
2 replies 0 retweets 0 likes -
Replying to @steveklabnik
okay, i ported over what is now "git init" C: https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/original/init-db.c … Rust: https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/port/src/bin/init-db.rs … neato
4 replies 3 retweets 7 likes -
Replying to @steveklabnik
https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/port/src/bin/init-db.rs#L32-L35 … Seems like you can use `var_os` and not have that error case at all.
1 reply 0 retweets 0 likes -
Replying to @sgrif
then i get an OsString rather than a String, which means then i have to convert to String
2 replies 0 retweets 0 likes -
Replying to @steveklabnik
Looks like the only place you're operating on it strictly as a string is https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/port/src/bin/init-db.rs#L46 … which could use join instead
1 reply 0 retweets 0 likes -
Replying to @sgrif
ahhh that's true.....
2 replies 0 retweets 0 likes
Also it looks like you're missing this return https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/original/init-db.c#L28 … here https://github.com/steveklabnik/rit/blob/a23e64e908f7677f4100fcaab6d19216848751d5/port/src/bin/init-db.rs#L25 …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.