Karthik Nayak <karthik....@gmail.com> writes:

> So either we could introduce a new atom for sorting something like
> `branch_sort` which uses the FILTER_REFS_(DETACHED_HEAD | BRANCHES |
> REMOTES)

I don't think you need a new atom. You can just change the sorting
function to consider that detached HEAD is always first, and when
comparing two non-detached-HEAD branches, use the atom supplied by the
user.

That would mean the detached HEAD would be displayed first regardless of
--sort (which is the case right now).

Introducing a new atom would mean that "git branch --sort authorname"
would not use this new atom, hence the HEAD would be sorted like the
others. I don't know if this is good or bad.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to