Commit 294d3867e6ef20f89020d744c091a42cd3992eed

Merge branch 'master' of git://github.com/henrik/git-tmbundle into release

Commit diff

README.textile

 
4848* <b>Geoff Cheshire</b> - Textile'd the README to make it look good on GitHub.
4949* <b>Martin Kühl</b> - Patch to allow committing into a git repository that's not the project root.
5050* <b>Diego Barros</b> - new config options, usability improvements
51* <b>Thomas Aylott</b> - Git commit langauge folding
52* <b>Michael Sheets</b> - Usability improvements
51* <b>Thomas Aylott</b> - Git commit language folding
52* <b>Michael Sheets</b> - Usability improvements
53* <b>Henrik Nyh</b> - Spelling
toggle raw diff

Support/app/controllers/diff_controller.rb

 
44 show_diff_title unless params[:layout].to_s=="false"
55 @rev = params[:rev]
66 @title = params[:title] || "Uncomitted changes"
7
8 diff_params = extract_diff_params(params)
9 render("_diff_results", :locals => {:diff_results => git.diff(diff_params)})
7 params[:context_lines] = git.config["git-tmbundle.log.context-lines"] if git.config["git-tmbundle.log.context-lines"]
8 render("_diff_results", :locals => {:diff_results => git.diff(params)})
109 end
1110
1211 def uncommitted_changes
1616 git.paths(:fallback => :current_file, :unique => true)
1717 end
1818 base = git.git_base
19 puts "<h2>Uncomitted Changes for ‘#{htmlize(paths.map{|path| shorten(path, base)} * ', ')}’</h2>"
19 puts "<h2>Uncommitted Changes for ‘#{htmlize(paths.map{|path| shorten(path, base)} * ', ')}’</h2>"
2020 open_in_tm_link
2121
2222 paths.each do |path|
toggle raw diff

Support/spec/fixtures/changed_files_with_break.diff

 
4848@@ -15,7 +15,7 @@ base = git.nca(paths)
4949 Formatters::Diff.new(base) do |f|
5050 paths.each do |path|
51 f.header("Uncomitted Changes for ‘#{htmlize(shorten(path, base))}’")
51 f.header("Uncommitted Changes for ‘#{htmlize(shorten(path, base))}’")
5252- f.content(git.diff(path, base))
5353+ f.content(git.diff_file(ENV["TM_PROJECT_DIRECTORY"], base))
5454 end
toggle raw diff