Skip to content

branch --list: print useful info whilst interactive rebasing a detached HEAD

Kaartic Sivaraam git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 2 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2branch --list: print useful info whilst interactive rebasing a detached HEADref-filter.c+8 -40 replies
2/2t3200: verify "branch --list" sanity when rebasing from detached HEADt/t3200-branch.sh+24 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] branch --list: print useful info whilst interactive rebasing a detached HEAD

Ok, I seem to have forgotten the cover letter. So, here's one.

The changes from v1 are as follows:

* Changes to the commit message of 1/2 to fix some errors

* Code changes to 1/2 to address the comments from v1

* Patch 2/2 is new. It's adds tests for the issue that 1/2 tries to fix. It's written by Eric with a little fix by me to make it work with GETTEXT_POISON.

An interdiff for 1/2:

ref-filter.c +5 -11
index a4c917c96..db2baedfe 100644
@@ -1309,18 +1309,14 @@ char *get_head_description(void)
        memset(&state, 0, sizeof(state));
        wt_status_get_state(&state, 1);
        if (state.rebase_in_progress ||
-           state.rebase_interactive_in_progress)
-       {
-               const char *rebasing = NULL;
-               if (state.branch != NULL)
-                       rebasing = state.branch;
+           state.rebase_interactive_in_progress) {
+               if (state.branch)
+                       strbuf_addf(&desc, _("(no branch, rebasing %s)"),
+                                   state.branch);
                else
-                       rebasing = state.detached_from;
-
-               strbuf_addf(&desc, _("(no branch, rebasing %s)"),
-                           rebasing);
-       }
-       else if (state.bisect_in_progress)
+                       strbuf_addf(&desc, _("(no branch, rebasing

detached HEAD %s)"),
+ state.detached_from);
+ } else if (state.bisect_in_progress)

                strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
                            state.branch);
        else if (state.detached_from) {

Eric Sunshine (1):
t3200: verify "branch --list" sanity when rebasing from detached HEAD

Kaartic Sivaraam (1):
branch --list: print useful info whilst interactive rebasing a
detached HEAD

 ref-filter.c      | 12 ++++++++----
 t/t3200-branch.sh | 24 ++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 4 deletions(-)