{"action":"created","comment":{"url":"https://api.github.com/repos/redox-os/coreutils/pulls/comments/59254173","id":59254173,"diff_hunk":"@@ -1,21 +1,201 @@\n #![deny(warnings)]\n-\n extern crate extra;\n \n use std::env;\n+use std::error::Error;\n use std::fs;\n-use std::io;\n-use extra::io::fail;\n+use std::io::{self, Write, Stderr, Stdout, StdoutLock};\n+use std::path::{Path, PathBuf};\n+use std::process::exit;\n use extra::option::OptionalExt;\n \n+const MAN_PAGE: &'static str = r#\"NAME\n+    rm - remove files and directories\n+\n+SYNOPSIS\n+    rm [-h | --help] [-d | --dir] [-i] [-r | -R | --recursive] [-v | --verbose] TARGETS...\n+\n+DESCRIPTION\n+    If a source is on the same device as it's respective destination, it will be renamed. If it is on a different device, it will be copied.\n+\n+    If the target is a directory, the source will be moved into that directory.\n+\n+OPTIONS\n+    -h\n+    --help\n+        Display this help information and exit.\n+\n+    -d\n+    --dir\n+        Remove empty directories in addition to files.\n+\n+    -i\n+        Prompt before removing all files and directories.\n+\n+    -r\n+    -R\n+    --recursive\n+        Remove directories and their contents recursively.\n+\n+    -v\n+    --verbose\n+        Print the file changes that have been successfully performed.\n+\n+AUTHOR\n+    Written by Michael Murphy.\n+\"#;\n+\n fn main() {\n-    let mut stderr = io::stderr();\n+    let stdout = io::stdout();\n+    let mut rm = Program::initialize(&stdout);\n+    rm.execute();\n+}\n+\n+struct Program<'a> {\n+    arguments:   Vec<PathBuf>,\n+    directory:   bool,\n+    interactive: bool,\n+    recursive:   bool,\n+    verbose:     bool,\n+    stderr:      Stderr,\n+    stdout:      StdoutLock<'a>,\n+}\n+\n+impl<'a> Program<'a> {\n+    /// Initialize the program's arguments and check if the paths are valid.\n+    fn initialize(stdout: &'a Stdout) -> Program<'a> {\n+        let mut rm = Program {\n+            arguments:   Vec::new(),\n+            directory:   false,\n+            interactive: false,\n+            recursive:   false,\n+            verbose:     false,\n+            stderr:      io::stderr(),\n+            stdout:      stdout.lock()\n+        };\n+        for argument in env::args().skip(1).collect::<Vec<String>>() {\n+            match argument.as_str() {\n+                \"-d\" | \"--dir\" => rm.directory = true,\n+                \"-h\" | \"--help\" => {\n+                    rm.stdout.write(MAN_PAGE.as_bytes()).try(&mut rm.stderr);\n+                    rm.stdout.flush().try(&mut rm.stderr);\n+                    exit(0);\n+                },\n+                \"-i\" => rm.interactive = true,\n+                \"-r\" | \"-R\" | \"--recursive\" => {\n+                    rm.directory = true;\n+                    rm.recursive = true;\n+                },\n+                \"-v\" | \"--verbose\" => rm.verbose = true,\n+                _ => {\n+                    if fs::metadata(&argument).is_err() {\n+                        rm.stderr.write(b\"aborting due to invalid path: '\").try(&mut rm.stderr);\n+                        rm.stderr.write(&argument.as_bytes()).try(&mut rm.stderr);\n+                        rm.stderr.write(b\"'\\n\").try(&mut rm.stderr);\n+                        rm.stderr.flush().try(&mut rm.stderr);\n+                        exit(1);\n+                    } else {\n+                        rm.arguments.push(PathBuf::from(&argument));\n+                    }\n+                }\n+            }\n+        }\n+        if rm.arguments.len() == 0 {\n+            rm.stdout.write(b\"missing operand\\nTry 'rm --help' for more information.\\n\").try(&mut rm.stderr);\n+            rm.stdout.flush().try(&mut rm.stderr);\n+            exit(0);\n+        }\n+        rm\n+    }\n+\n+    /// Executes the rm program's arguments using any given flags.\n+    fn execute(&mut self) {\n+        for argument in self.arguments.clone() {\n+            if argument.is_dir() {\n+                if self.interactive {\n+                    self.stdout.write(b\"remove directory '\").try(&mut self.stderr);\n+                    self.stdout.write(argument.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                    self.stdout.write(b\"'? \").try(&mut self.stderr);\n+                    self.stdout.flush().try(&mut self.stderr);\n+                    let input = &mut String::new();\n+                    let stdin = io::stdin();\n+                    stdin.read_line(input).try(&mut self.stderr);\n+                    if input.chars().next().unwrap() != 'y' { continue }\n+                }\n+                if self.directory {\n+                    self.remove_directory(&argument);\n+                } else {\n+                    self.stderr.write(b\"cannot remove '\").try(&mut self.stderr);\n+                    self.stderr.write(argument.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                    self.stderr.write(b\"': is a directory\\n\").try(&mut self.stderr);\n+                    self.stderr.flush().try(&mut self.stderr);\n+                }\n+            } else {\n+                if self.interactive {\n+                    self.stdout.write(b\"remove file '\").try(&mut self.stderr);\n+                    self.stdout.write(argument.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                    self.stdout.write(b\"'? \").try(&mut self.stderr);\n+                    self.stdout.flush().try(&mut self.stderr);\n+                    let input = &mut String::new();\n+                    let stdin = io::stdin();\n+                    stdin.read_line(input).try(&mut self.stderr);\n+                    if input.chars().next().unwrap() != 'y' { continue }\n+                }\n+                self.remove_file(&argument);\n+            }\n+        }\n+    }\n \n-    if env::args().count() < 2 {\n-        fail(\"no arguments.\", &mut stderr);\n+    /// Attempt to remove the file given as an input argument.\n+    fn remove_file(&mut self, file: &Path) {\n+        if let Err(message) = fs::remove_file(file) {\n+            self.stderr.write(b\"cannot remove '\").try(&mut self.stderr);\n+            self.stderr.write(file.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+            self.stderr.write(b\"': \").try(&mut self.stderr);\n+            print_error(message, &mut self.stderr);\n+        } else if self.verbose {\n+            self.stdout.write(b\"removed '\").try(&mut self.stderr);\n+            self.stdout.write(file.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+            self.stdout.write(b\"'\\n\").try(&mut self.stderr);\n+            self.stdout.flush().try(&mut self.stderr);\n+        }\n     }\n \n-    for ref path in env::args().skip(1) {\n-        fs::remove_file(path).try(&mut stderr);\n+    /// Attempt to remove a directory and all of it's contents if recursive mode is enabled.\n+    /// If recursion is not enabled, attempt to remove the directory if it is empty.\n+    fn remove_directory(&mut self, directory: &Path) {\n+        // TODO: Use walkdir when it is implemented in Redox instead of fs::remove_dir_all().\n+        if self.recursive {\n+            if let Err(message) = fs::remove_dir_all(directory) {\n+                self.stderr.write(b\"cannot remove directory '\").try(&mut self.stderr);\n+                self.stderr.write(directory.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                self.stderr.write(b\"': \").try(&mut self.stderr);\n+                print_error(message, &mut self.stderr);\n+            } else if self.verbose {\n+                self.stdout.write(b\"removed directory '\").try(&mut self.stderr);\n+                self.stdout.write(directory.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                self.stdout.write(b\"'\\n\").try(&mut self.stderr);\n+                self.stdout.flush().try(&mut self.stderr);\n+            }\n+        } else {\n+            if let Err(message) = fs::remove_dir(directory) {\n+                self.stderr.write(b\"cannot remove directory '\").try(&mut self.stderr);\n+                self.stderr.write(directory.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                self.stderr.write(b\"': \").try(&mut self.stderr);\n+                print_error(message, &mut self.stderr);\n+            } else if self.verbose {\n+                self.stdout.write(b\"removed directory '\").try(&mut self.stderr);\n+                self.stdout.write(directory.to_string_lossy().as_bytes()).try(&mut self.stderr);\n+                self.stdout.write(b\"'\\n\").try(&mut self.stderr);\n+                self.stdout.flush().try(&mut self.stderr);\n+            }\n+        }\n     }\n }\n+\n+/// Print the message given by an io::Error to stderr.\n+fn print_error(message: io::Error, stderr: &mut Stderr) {","path":"src/bin/rm.rs","position":216,"original_position":205,"commit_id":"c82a7e5cb457e788d041c08f932b899d6034eeb1","original_commit_id":"c86bb47aa49fc6f0d7af52b9c15332b69b758c1b","user":{"login":"Ticki","id":13349091,"avatar_url":"https://avatars.githubusercontent.com/u/13349091?v=3","gravatar_id":"","url":"https://api.github.com/users/Ticki","html_url":"https://github.com/Ticki","followers_url":"https://api.github.com/users/Ticki/followers","following_url":"https://api.github.com/users/Ticki/following{/other_user}","gists_url":"https://api.github.com/users/Ticki/gists{/gist_id}","starred_url":"https://api.github.com/users/Ticki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ticki/subscriptions","organizations_url":"https://api.github.com/users/Ticki/orgs","repos_url":"https://api.github.com/users/Ticki/repos","events_url":"https://api.github.com/users/Ticki/events{/privacy}","received_events_url":"https://api.github.com/users/Ticki/received_events","type":"User","site_admin":false},"body":"For the reasons stated above, they should in fact. You claim is empty, and there is no reason behind it.","created_at":"2016-04-11T18:17:43Z","updated_at":"2016-04-11T18:17:43Z","html_url":"https://github.com/redox-os/coreutils/pull/51#discussion_r59254173","pull_request_url":"https://api.github.com/repos/redox-os/coreutils/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/comments/59254173"},"html":{"href":"https://github.com/redox-os/coreutils/pull/51#discussion_r59254173"},"pull_request":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/redox-os/coreutils/pulls/51","id":65869453,"html_url":"https://github.com/redox-os/coreutils/pull/51","diff_url":"https://github.com/redox-os/coreutils/pull/51.diff","patch_url":"https://github.com/redox-os/coreutils/pull/51.patch","issue_url":"https://api.github.com/repos/redox-os/coreutils/issues/51","number":51,"state":"open","locked":false,"title":"Improve rm Command","user":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"body":"- Implement the directory, interactive, recursive and verbose flags.\r\n- Check if all paths are valid before removing files.\r\n- Add a constant MAN_PAGE.\r\n\r\nWalking directories with the `walkdir` crate has been withheld until Redox gains support for it.","created_at":"2016-04-09T03:28:58Z","updated_at":"2016-04-11T18:17:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40bc3c6167257155bea855bbc3566bee3d0e6cfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/redox-os/coreutils/pulls/51/commits","review_comments_url":"https://api.github.com/repos/redox-os/coreutils/pulls/51/comments","review_comment_url":"https://api.github.com/repos/redox-os/coreutils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redox-os/coreutils/issues/51/comments","statuses_url":"https://api.github.com/repos/redox-os/coreutils/statuses/c82a7e5cb457e788d041c08f932b899d6034eeb1","head":{"label":"mmstick:rm","ref":"rm","sha":"c82a7e5cb457e788d041c08f932b899d6034eeb1","user":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"repo":{"id":53432582,"name":"coreutils","full_name":"mmstick/coreutils","owner":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmstick/coreutils","description":"The Redox coreutils.","fork":true,"url":"https://api.github.com/repos/mmstick/coreutils","forks_url":"https://api.github.com/repos/mmstick/coreutils/forks","keys_url":"https://api.github.com/repos/mmstick/coreutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmstick/coreutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmstick/coreutils/teams","hooks_url":"https://api.github.com/repos/mmstick/coreutils/hooks","issue_events_url":"https://api.github.com/repos/mmstick/coreutils/issues/events{/number}","events_url":"https://api.github.com/repos/mmstick/coreutils/events","assignees_url":"https://api.github.com/repos/mmstick/coreutils/assignees{/user}","branches_url":"https://api.github.com/repos/mmstick/coreutils/branches{/branch}","tags_url":"https://api.github.com/repos/mmstick/coreutils/tags","blobs_url":"https://api.github.com/repos/mmstick/coreutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmstick/coreutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmstick/coreutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmstick/coreutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmstick/coreutils/statuses/{sha}","languages_url":"https://api.github.com/repos/mmstick/coreutils/languages","stargazers_url":"https://api.github.com/repos/mmstick/coreutils/stargazers","contributors_url":"https://api.github.com/repos/mmstick/coreutils/contributors","subscribers_url":"https://api.github.com/repos/mmstick/coreutils/subscribers","subscription_url":"https://api.github.com/repos/mmstick/coreutils/subscription","commits_url":"https://api.github.com/repos/mmstick/coreutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmstick/coreutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmstick/coreutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmstick/coreutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmstick/coreutils/contents/{+path}","compare_url":"https://api.github.com/repos/mmstick/coreutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmstick/coreutils/merges","archive_url":"https://api.github.com/repos/mmstick/coreutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmstick/coreutils/downloads","issues_url":"https://api.github.com/repos/mmstick/coreutils/issues{/number}","pulls_url":"https://api.github.com/repos/mmstick/coreutils/pulls{/number}","milestones_url":"https://api.github.com/repos/mmstick/coreutils/milestones{/number}","notifications_url":"https://api.github.com/repos/mmstick/coreutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmstick/coreutils/labels{/name}","releases_url":"https://api.github.com/repos/mmstick/coreutils/releases{/id}","deployments_url":"https://api.github.com/repos/mmstick/coreutils/deployments","created_at":"2016-03-08T17:44:11Z","updated_at":"2016-03-08T17:44:12Z","pushed_at":"2016-04-10T17:27:03Z","git_url":"git://github.com/mmstick/coreutils.git","ssh_url":"git@github.com:mmstick/coreutils.git","clone_url":"https://github.com/mmstick/coreutils.git","svn_url":"https://github.com/mmstick/coreutils","homepage":"","size":144,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"redox-os:master","ref":"master","sha":"1bdd1fe08a8d30796cdc61fbd12dba9952401f69","user":{"login":"redox-os","id":14909902,"avatar_url":"https://avatars.githubusercontent.com/u/14909902?v=3","gravatar_id":"","url":"https://api.github.com/users/redox-os","html_url":"https://github.com/redox-os","followers_url":"https://api.github.com/users/redox-os/followers","following_url":"https://api.github.com/users/redox-os/following{/other_user}","gists_url":"https://api.github.com/users/redox-os/gists{/gist_id}","starred_url":"https://api.github.com/users/redox-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redox-os/subscriptions","organizations_url":"https://api.github.com/users/redox-os/orgs","repos_url":"https://api.github.com/users/redox-os/repos","events_url":"https://api.github.com/users/redox-os/events{/privacy}","received_events_url":"https://api.github.com/users/redox-os/received_events","type":"Organization","site_admin":false},"repo":{"id":48803546,"name":"coreutils","full_name":"redox-os/coreutils","owner":{"login":"redox-os","id":14909902,"avatar_url":"https://avatars.githubusercontent.com/u/14909902?v=3","gravatar_id":"","url":"https://api.github.com/users/redox-os","html_url":"https://github.com/redox-os","followers_url":"https://api.github.com/users/redox-os/followers","following_url":"https://api.github.com/users/redox-os/following{/other_user}","gists_url":"https://api.github.com/users/redox-os/gists{/gist_id}","starred_url":"https://api.github.com/users/redox-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redox-os/subscriptions","organizations_url":"https://api.github.com/users/redox-os/orgs","repos_url":"https://api.github.com/users/redox-os/repos","events_url":"https://api.github.com/users/redox-os/events{/privacy}","received_events_url":"https://api.github.com/users/redox-os/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redox-os/coreutils","description":"The Redox coreutils.","fork":false,"url":"https://api.github.com/repos/redox-os/coreutils","forks_url":"https://api.github.com/repos/redox-os/coreutils/forks","keys_url":"https://api.github.com/repos/redox-os/coreutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redox-os/coreutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redox-os/coreutils/teams","hooks_url":"https://api.github.com/repos/redox-os/coreutils/hooks","issue_events_url":"https://api.github.com/repos/redox-os/coreutils/issues/events{/number}","events_url":"https://api.github.com/repos/redox-os/coreutils/events","assignees_url":"https://api.github.com/repos/redox-os/coreutils/assignees{/user}","branches_url":"https://api.github.com/repos/redox-os/coreutils/branches{/branch}","tags_url":"https://api.github.com/repos/redox-os/coreutils/tags","blobs_url":"https://api.github.com/repos/redox-os/coreutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redox-os/coreutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redox-os/coreutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/redox-os/coreutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redox-os/coreutils/statuses/{sha}","languages_url":"https://api.github.com/repos/redox-os/coreutils/languages","stargazers_url":"https://api.github.com/repos/redox-os/coreutils/stargazers","contributors_url":"https://api.github.com/repos/redox-os/coreutils/contributors","subscribers_url":"https://api.github.com/repos/redox-os/coreutils/subscribers","subscription_url":"https://api.github.com/repos/redox-os/coreutils/subscription","commits_url":"https://api.github.com/repos/redox-os/coreutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/redox-os/coreutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/redox-os/coreutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/redox-os/coreutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/redox-os/coreutils/contents/{+path}","compare_url":"https://api.github.com/repos/redox-os/coreutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redox-os/coreutils/merges","archive_url":"https://api.github.com/repos/redox-os/coreutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redox-os/coreutils/downloads","issues_url":"https://api.github.com/repos/redox-os/coreutils/issues{/number}","pulls_url":"https://api.github.com/repos/redox-os/coreutils/pulls{/number}","milestones_url":"https://api.github.com/repos/redox-os/coreutils/milestones{/number}","notifications_url":"https://api.github.com/repos/redox-os/coreutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redox-os/coreutils/labels{/name}","releases_url":"https://api.github.com/repos/redox-os/coreutils/releases{/id}","deployments_url":"https://api.github.com/repos/redox-os/coreutils/deployments","created_at":"2015-12-30T14:13:05Z","updated_at":"2016-04-11T04:29:32Z","pushed_at":"2016-04-11T18:14:08Z","git_url":"git://github.com/redox-os/coreutils.git","ssh_url":"git@github.com:redox-os/coreutils.git","clone_url":"https://github.com/redox-os/coreutils.git","svn_url":"https://github.com/redox-os/coreutils","homepage":"","size":166,"stargazers_count":28,"watchers_count":28,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/51"},"html":{"href":"https://github.com/redox-os/coreutils/pull/51"},"issue":{"href":"https://api.github.com/repos/redox-os/coreutils/issues/51"},"comments":{"href":"https://api.github.com/repos/redox-os/coreutils/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redox-os/coreutils/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/redox-os/coreutils/statuses/c82a7e5cb457e788d041c08f932b899d6034eeb1"}}}}