diff options
| author | Junio C Hamano <gitster@pobox.com> | 2010-04-03 12:28:40 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2010-04-03 12:28:40 -0700 |
| commit | 40a56f45bcfeb5443bbd3b7f9e9f7ffd570d5398 (patch) | |
| tree | 01d74a353d985bda705de764d0ab738dc4f83d7c /builtin/ls-files.c | |
| parent | 0cb050abc2e7f05894f9f79d5330ce4559653af6 (diff) | |
| parent | 531e758d9c861facd4ebcc8c9b0e4e1443b5665a (diff) | |
Merge branch 'ef/cherry-abbrev'
* ef/cherry-abbrev:
ls: remove redundant logic
cherry: support --abbrev option
Diffstat (limited to 'builtin/ls-files.c')
| -rw-r--r-- | builtin/ls-files.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index b065061392..c0fbcdcf4f 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -153,8 +153,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce) printf("%s%06o %s %d\t", tag, ce->ce_mode, - abbrev ? find_unique_abbrev(ce->sha1,abbrev) - : sha1_to_hex(ce->sha1), + find_unique_abbrev(ce->sha1,abbrev), ce_stage(ce)); } write_name_quoted(ce->name + offset, stdout, line_terminator); @@ -176,9 +175,7 @@ static int show_one_ru(struct string_list_item *item, void *cbdata) if (!ui->mode[i]) continue; printf("%s%06o %s %d\t", tag_resolve_undo, ui->mode[i], - abbrev - ? find_unique_abbrev(ui->sha1[i], abbrev) - : sha1_to_hex(ui->sha1[i]), + find_unique_abbrev(ui->sha1[i], abbrev), i + 1); write_name_quoted(path + offset, stdout, line_terminator); } |
