summaryrefslogtreecommitdiff
path: root/rev-parse.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-08-16 22:30:46 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-08-16 22:30:46 -0700
commit6680153441de6fbba07868d5f54af74d31a3ff13 (patch)
tree200df64306c16fb12a5068092d92237ba33cd7b9 /rev-parse.c
parentMerge with master changes. (diff)
parentTeach applymbox to keep the Subject: line. (diff)
downloadtgif-6680153441de6fbba07868d5f54af74d31a3ff13.tar.xz
Merge with master to get diff fixes.
Diffstat (limited to 'rev-parse.c')
-rw-r--r--rev-parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rev-parse.c b/rev-parse.c
index 1c6ae76f9a..39cf63540e 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -134,7 +134,8 @@ int main(int argc, char **argv)
{
int i, as_is = 0;
unsigned char sha1[20];
-
+ const char *prefix = setup_git_directory();
+
for (i = 1; i < argc; i++) {
char *arg = argv[i];
char *dotdot;
@@ -189,6 +190,10 @@ int main(int argc, char **argv)
for_each_ref(show_reference);
continue;
}
+ if (!strcmp(arg, "--show-prefix")) {
+ puts(prefix);
+ continue;
+ }
show_arg(arg);
continue;
}