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

Re: openbsd version?

From
Junio C Hamano <junkio@cox.net>
Date
Oct 10, 2005, 21:31 UTC
Message-ID
<7v4q7p2h5v.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<86ek6tcdou.fsf@blue.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> <sarcasm>Undocumented secret switches.  Nice.</sarcasm>  No wonder
> I couldn't find it.

Sorry. This is taken from the log message from the commit that introduced the switch.

    git-branch -d <branch>: delete unused branch.
    
    The new flag '-d' lets you delete a branch.  For safety, it does not
    lets you delete the branch you are currently on, nor a branch that
    has been fully merged into your current branch.
    
    The credit for the safety check idea goes to Daniel Barkalow.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>

There should be a document in Documentation/howto/ to describe how to find the commit that introduced a particular feature. What I did to find the above is this:

   1. Look at git-branch.sh and notice that there is this line:
    echo >&2 "usage: $(basename $0)"' [-d <branch>] | [<branch> [start-point]]
   Make an educated guess that this line, especially the
   "[-d <branch>]" part, must have changed when the feature was
   added (that is, pre-modification file would not have had "[-d
   <branch>]" in it, but post-modification file would).
   2. Find such a change with pickaxe (-S):
    $ git whatchanged -S'[-d <branch>]' git-branch.sh

By mentioning this, I do not mean to say that you could have figuired this out yourself -- the above sequence is useful for somebody who knows the code already to do archaeology; IOW you still need to know what to look for, so the above procedure would not have helped at all even if you knew about pickaxe.

> Do these also flush any related object files?  Or do I need git-fsck still?

The latter. I think there should be a general description in the tutorial to advice the user to run git-fsck-objects every once in a while, while mentioning that there is no need to do it too often -- disk space is cheap and the time you spend waiting for fsck-objects to finish tends to be more expensive.

Previous: Daniel BarkalowNext: Sven Verdoolaege
Message 13 of 17 in “openbsd version?”
  1. Randal L. SchwartzOct 10, 2005
  2. Peter EriksenOct 10, 2005
  3. Linus TorvaldsOct 10, 2005
  4. Junio C HamanoOct 10, 2005
  5. Randal L. SchwartzOct 10, 2005
  6. Junio C HamanoOct 10, 2005
  7. Randal L. SchwartzOct 10, 2005
  8. Johannes SchindelinOct 10, 2005
  9. Randal L. SchwartzOct 10, 2005
  10. H. Peter AnvinOct 10, 2005
  11. Randal L. SchwartzOct 10, 2005
  12. Daniel BarkalowOct 10, 2005
  13. Junio C HamanoOct 10, 2005
  14. Sven VerdoolaegeOct 10, 2005
  15. Junio C HamanoOct 10, 2005
  16. Junio C HamanoOct 13, 2005
  17. Sven VerdoolaegeOct 13, 2005

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.