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

A new way to get a sha1?

From
Thomas Badie <thomas.badie@gmail.com>
Date
Jul 30, 2012, 12:11 UTC
Message-ID
<jv5tln$96e$1@dough.gmane.org>
Hi all,

When I should fixup or squash a commit, I nearly never remember how to get the sha1 of the commit I want to fixup. Because sometimes HEAD~n is not enough, I make `git log`, copy the sha1 of the right commit and paste it in my git fixup command. So I wrote a perl script to avoid the usage of the mouse. And after discussion with some of my friends, this can be generalized as a generic command line interface tool to get a sha1.

The idea is to have a perl module which run through the log history and print 10 shortlog associated with a number from 0 to 9, and a message below "Select commit [| 0, 9 |] or next row ?" or this kind of message with several options.

So I ask to the community if this module is interesting for git. It can be integrated everywhere a sha1 is requested (git rebase, git reset, ...). IMHO, it can be an enhancement.

So, what is your opinion? Should I make this script a perl module and integrate it in git, or should I just keep it in my own script toolbox?

Thanks for reading and answering,
-- 
Thomas "Enki" Badie 
Next: Jan Engelhardt
Message 1 of 16 in “A new way to get a sha1?”
  1. Thomas BadieJul 30, 2012
  2. Jan EngelhardtJul 30, 2012
  3. Junio C HamanoJul 30, 2012
  4. Thomas BadieJul 30, 2012
  5. Martin LanghoffJul 30, 2012
  6. Junio C HamanoJul 30, 2012
  7. Martin LanghoffJul 30, 2012
  8. Andreas SchwabJul 30, 2012
  9. Thomas BadieJul 30, 2012
  10. Jeff KingJul 30, 2012
  11. Thomas BadieJul 30, 2012
  12. Andreas SchwabJul 30, 2012
  13. Sitaram ChamartyJul 30, 2012
  14. Thomas BadieJul 30, 2012
  15. Thomas RastJul 30, 2012
  16. Thomas BadieJul 30, 2012

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.