Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: openbsd version? · Junio C Hamano <hidden> · 2016-06-15

Re: openbsd version?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:08

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 [off-list ref]

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help