summaryrefslogtreecommitdiff
path: root/rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-06 21:42:08 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-06 21:42:59 (GMT)
commitc66b6c067e49c5ec80f1254daef79aa1c7f5ffce (patch)
tree48367903de59ddef7aea7c8f20da4e07243e8d44 /rev-parse.c
parent8ac80a5701780547404523a84f4b1ae67bfa6823 (diff)
parentbd886fd3ea49b726493255d4adf5d20b31681713 (diff)
downloadgit-c66b6c067e49c5ec80f1254daef79aa1c7f5ffce.zip
git-c66b6c067e49c5ec80f1254daef79aa1c7f5ffce.tar.gz
git-c66b6c067e49c5ec80f1254daef79aa1c7f5ffce.tar.bz2
Merge branch 'master' into js/fmt-patch
* master: (109 commits) t1300-repo-config: two new config parsing tests. Another config file parsing fix. update-index: plug memory leak from prefix_path() checkout-index: plug memory leak from prefix_path() update-index --unresolve: work from a subdirectory. pack-object: squelch eye-candy on non-tty core.prefersymlinkrefs: use symlinks for .git/HEAD repo-config: trim white-space before comment Fix for config file section parsing. Clarify git-cherry documentation. Update git-unpack-objects documentation. Fix up docs where "--" isn't displayed correctly. Several trivial documentation touch ups. git-svn 1.0.0 git-svn: documentation updates delta: stricter constness Makefile: do not link rev-list any specially. builtin-push: --all and --tags _are_ explicit refspecs builtin-log/whatchanged/show: make them official. show-branch: omit uninteresting merges. ...
Diffstat (limited to 'rev-parse.c')
-rw-r--r--rev-parse.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/rev-parse.c b/rev-parse.c
index e956cd5..62e16af 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -169,14 +169,12 @@ int main(int argc, char **argv)
git_config(git_default_config);
for (i = 1; i < argc; i++) {
- struct stat st;
char *arg = argv[i];
char *dotdot;
if (as_is) {
if (show_file(arg) && as_is < 2)
- if (lstat(arg, &st) < 0)
- die("'%s': %s", arg, strerror(errno));
+ verify_filename(prefix, arg);
continue;
}
if (!strcmp(arg,"-n")) {
@@ -342,8 +340,7 @@ int main(int argc, char **argv)
continue;
if (verify)
die("Needed a single revision");
- if (lstat(arg, &st) < 0)
- die("'%s': %s", arg, strerror(errno));
+ verify_filename(prefix, arg);
}
show_default();
if (verify && revs_count != 1)