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

Re: [GIT PULL] sh updates for 2.6.25

From
Junio C Hamano <junio@pobox.com>
Date
Apr 16, 2008, 20:02 UTC
Message-ID
<7vve2hpnz1.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.1.00.0804151222350.2879@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 7 quoted lines
> Ahh, looks like a git-am buglet then. It will indeed turn an empty subject 
> line into an empty first line.
>
> We should run "git stripspace" on the whole thing, so maybe a patch 
> something like the appended will help.
>
> NOTE! Totally untested! Beware the patch!

The basic idea is very sound and as usual your patch deletes more lines than it adds, which always impresses me. I wish all our patches are like this.

Show 13 quoted lines
> @@ -388,6 +383,7 @@ do
>  			;;
>  		esac
>  	esac
> +	FIRSTLINE=$(head -1 "$dotest/final-commit")
>  
>  	resume=
>  	if test "$interactive" = t
> @@ -408,7 +404,6 @@ do
>  		[aA]*) action=yes interactive= ;;
>  		[nN]*) action=skip ;;
>  		[eE]*) git_editor "$dotest/final-commit"
> -		       SUBJECT=$(reread_subject "$dotest/final-commit")

This needs to be replaced with re-assignment to FIRSTLINE, as the user may have fixed the title in the editor; otherwise...

Show 6 quoted lines
> @@ -431,7 +426,7 @@ do
>  		stop_here $this
>  	fi
>  
> -	printf 'Applying %s\n' "$SUBJECT"
> +	printf 'Applying %s\n' "$FIRSTLINE"

... this would surprise the user who expects us to give the report with the updated title.

Previous: Alex RiesenNext: Linus Torvalds
Message 6 of 17 in “Re: [GIT PULL] sh updates for 2.6.25”
  1. Linus TorvaldsApr 15, 2008
  2. Linus TorvaldsApr 15, 2008
  3. Paul MundtApr 15, 2008
  4. Linus TorvaldsApr 15, 2008
  5. Alex RiesenApr 16, 2008
  6. Junio C HamanoApr 16, 2008
  7. Linus TorvaldsApr 16, 2008
  8. Junio C HamanoApr 15, 2008
  9. Jakub NarebskiApr 15, 2008
  10. Miklos VajnaApr 16, 2008
  11. format-patch: Make sure the subject is always a one-linerMiklos Vajna, Apr 16, 2008
  12. Junio C HamanoApr 16, 2008
  13. Miklos VajnaApr 16, 2008
  14. Re* [GIT PULL] sh updates for 2.6.25Junio C Hamano, Apr 16, 2008
  15. Jakub NarebskiApr 16, 2008
  16. Miklos VajnaApr 17, 2008
  17. David WoodhouseApr 27, 2008

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.