Thread (35 messages) 35 messages, 8 authors, 2016-06-15

Re: [PATCH v2] checkout: implement "-" shortcut name for last branch

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:57
Subsystem: the rest · Maintainer: Linus Torvalds

Hi,

On Thu, 15 Jan 2009, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
On Thu, 15 Jan 2009, Johannes Schindelin wrote:
quoted
[PATCH] pack-objects --all: include HEAD, which could be detached
In hind sight, it would probably be better to add this to revision.c.
If you mean that "git log --all" should also include a possibly detached
HEAD in its traversal, and a patch that implements such a fix would
automatically fix "repack -a" without the patch you are responding to, I
think I agree 100%.
Yes, indeed.

Something like

-- snip --
diff --git a/revision.c b/revision.c
index db60f06..b065184 100644
--- a/revision.c
+++ b/revision.c
@@ -1263,6 +1263,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 
 			if (!strcmp(arg, "--all")) {
 				handle_refs(revs, flags, for_each_ref);
+				handle_refs(revs, flags, head_ref);
 				continue;
 			}
 			if (!strcmp(arg, "--branches")) {
-- snap --
but that was just a quick guess, and if nobody beats me to it, I'll turn 
it into a proper patch later.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help