diff --relative: help working in a bare repository
This allows the --relative option to say which subdirectory to pretend to be in, so that in a bare repository, you can say: $ git log --relative=drivers/ v2.6.20..v2.6.22 -- drivers/scsi/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -720,7 +720,7 @@ void init_revisions(struct rev_info *revs, const char *prefix)
|
||||
revs->commit_format = CMIT_FMT_DEFAULT;
|
||||
|
||||
diff_setup(&revs->diffopt);
|
||||
if (prefix) {
|
||||
if (prefix && !revs->diffopt.prefix) {
|
||||
revs->diffopt.prefix = prefix;
|
||||
revs->diffopt.prefix_length = strlen(prefix);
|
||||
}
|
||||
|
Reference in New Issue
Block a user