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

Re: [PATCH/RFCv4 2/2] git rebase -i: warn about removed commits

From
Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Date
Jun 3, 2015, 12:48 UTC
Message-ID
<1592132582.69681.1433335688516.JavaMail.zimbra@ensimag.grenoble-inp.fr>
In-Reply-To
<1433331859-24832-2-git-send-email-remi.galan-alfonso@ensimag.grenoble-inp.fr>
Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr> writes:
Show 8 quoted lines
> +                comm -2 -3 "$todo".oldsha1 "$todo".newsha1 >"$todo".miss
> +
> +                # Make the list user-friendly
> +                opt="--no-walk=sorted --format=oneline --abbrev-commit --stdin"
> +                git rev-list $opt <"$todo".miss >"$todo".miss+
> +                mv "$todo".miss+ "$todo".miss
> +
> +                # Check missing commits

Found a bug here, got an error message from git rev-list if "$todo".miss is empty.

Now it looks like:
Show 9 quoted lines
> 		# Check missing commits
> 		if test -s "$todo".miss
> 		then
> 			# Make the list user-friendly
> 			opt="--no-walk=sorted --format=oneline --abbrev-commit --stdin"
> 			git rev-list $opt <"$todo".miss >"$todo".miss+
> 			mv "$todo".miss+ "$todo".miss
> 
> 			warn "Warning: some commits may have been dropped" \
Thus the empty case is tested by the test -s of the warnings.

By the way, should I add --quiet to the options of the call to git rev-list?

Rémi
Previous: Galan RémiNext: Matthieu Moy
Message 3 of 11 in “git-rebase -i: add command "drop" to remove a commit”
  1. 1/2 git-rebase -i: add command "drop" to remove a commitGalan Rémi, Jun 3, 2015
  2. 2/2 git rebase -i: warn about removed commitsGalan Rémi, Jun 3, 2015
  3. Remi Galan AlfonsoJun 3, 2015
  4. Matthieu MoyJun 3, 2015
  5. Remi Galan AlfonsoJun 3, 2015
  6. Matthieu MoyJun 3, 2015
  7. Eric SunshineJun 3, 2015
  8. Remi Galan AlfonsoJun 3, 2015
  9. Remi Galan AlfonsoJun 6, 2015
  10. Junio C HamanoJun 3, 2015
  11. Remi Galan AlfonsoJun 3, 2015

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.