Re: Re* [RFC/PATCH] extend meaning of "--root" option to index comparisons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Jeff mostly explained what I expect from 'git log' and I agree with
him. We ('git log' 'git rev-parse' ...) should separate cases when
revision is broken (like we have a junk in the HEAD file) from the
case when "branch is not created yet" (which is part of normal
workflow).

What about following algorithm. HEAD points to ref and ref is not
created yet. Additional check could be
 a) there are no other refs
 or/and b) object database is empty

>> -     argc = setup_revisions(argc, argv, rev, "HEAD");
>> +     argc = setup_revisions(argc, argv, rev, NULL);
>> +     if (!rev->pending.nr) {
>> +             add_head_to_pending(rev);
>> +             if (!rev->pending.nr) {
>> +                     printf("No commits (yet).\n");
>> +                     exit(0);
>> +             }
>> +     }
>
> I like the idea of an improved message, but such a message should
> definitely not go to stdout; it would feed nonsense to a command like
> "git log | my_log_filter".

+1 here. By default 'git log' should not output anything in this case,
even "No commits yet". Although such message would be fine for
something like "git log --verbose"

-- 
anatol
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux