git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Apr 3, 2018, 05:02 UTC
Message-ID
<3566c82c-114a-ec2d-286c-2851e4b2952d@gmail.com>
In-Reply-To
<20180403043101.4072-1-kaartic.sivaraam@gmail.com>
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:
diff --git a/ref-filter.c b/ref-filter.c
index a4c917c96..db2baedfe 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -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(-)
Previous: Eric Sunshine
Message 27 of 27 in “branch -l: print useful info whilst rebasing a non-local branch”
  1. branch -l: print useful info whilst rebasing a non-local branchKaartic Sivaraam, Mar 24, 2018
  2. Eric SunshineMar 25, 2018
  3. Kaartic SivaraamMar 25, 2018
  4. Jeff KingMar 25, 2018
  5. Eric SunshineMar 25, 2018
  6. Eric SunshineMar 25, 2018
  7. Jeff KingMar 25, 2018
  8. Kaartic SivaraamMar 25, 2018
  9. Jacob KellerMar 25, 2018
  10. Jeff KingMar 26, 2018
  11. 1/5 t3200: unset core.logallrefupdates when testing reflog creationJeff King, Mar 26, 2018
  12. 2/5 t: switch "branch -l" to "branch --create-reflog"Jeff King, Mar 26, 2018
  13. 3/5 branch: deprecate "-l" optionJeff King, Mar 26, 2018
  14. 4/5 branch: drop deprecated "-l" optionJeff King, Mar 26, 2018
  15. 5/5 branch: make "-l" a synonym for "--list"Jeff King, Mar 26, 2018
  16. Eric SunshineMar 26, 2018
  17. Jacob KellerMar 26, 2018
  18. Junio C HamanoMar 25, 2018
  19. Eric SunshineMar 25, 2018
  20. Kaartic SivaraamMar 25, 2018
  21. 1/2 branch --list: print useful info whilst interactive rebasing a detached HEADKaartic Sivaraam, Apr 3, 2018
  22. 2/2 t3200: verify "branch --list" sanity when rebasing from detached HEADKaartic Sivaraam, Apr 3, 2018
  23. Eric SunshineApr 3, 2018
  24. Kaartic SivaraamApr 3, 2018
  25. 2/2 t3200: verify "branch --list" sanity when rebasing from detached HEADKaartic Sivaraam, Apr 3, 2018
  26. Eric SunshineApr 4, 2018
  27. 0/2 branch --list: print useful info whilst interactive rebasing a detached HEADKaartic Sivaraam, Apr 3, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.