{"thread":{"id":"23891","subject":"[PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","startedAt":"2010-05-24T15:22:44Z","lastAt":"2010-05-25T21:22:27Z","messageCount":10,"participants":["Pavan Kumar Sunkara","Christian Couder","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142207","messageId":"1274714564-7553-1-git-send-email-pavan.sss1991@gmail.com","threadId":"23891","inReplyTo":null,"subject":"[PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-05-24T15:22:44Z","receivedAt":"2010-05-24T15:22:44Z","isPatch":false,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"Create a new subdirectory called 'static' in gitweb/, and move\nall static files required by gitweb.cgi when running, which means\nstyles, images and Javascript code. This should make gitweb more\nreadable and easier to maintain.\n\nUpdate t/gitweb-lib.sh to reflect this change.The install-gitweb\nnow also include moving of static files into 'static' subdirectory\nin target directory: update Makefile, gitweb's INSTALL, README and\nMakefile accordingly.\n\nSigned-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n---\n\nThere is a small compatibility problem with the previous patch when\napplied to alt-git.git's next branch. I am resending this patch after\nsolving it.\n\n Makefile                            |   18 +++++++-------\n gitweb/INSTALL                      |   19 +++++++--------\n gitweb/Makefile                     |   40 ++++++++++++++++++----------------\n gitweb/README                       |   14 +++++++-----\n gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n gitweb/{ => static}/gitweb.css      |    0\n gitweb/{ => static}/gitweb.js       |    0\n t/gitweb-lib.sh                     |    6 ++--\n 9 files changed, 52 insertions(+), 49 deletions(-)\n rename gitweb/{ => static}/git-favicon.png (100%)\n rename gitweb/{ => static}/git-logo.png (100%)\n rename gitweb/{ => static}/gitweb.css (100%)\n rename gitweb/{ => static}/gitweb.js (100%)\n\ndiff --git a/Makefile b/Makefile\nindex 6eb6289..de7f680 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1561,32 +1561,32 @@ gitweb:\n \t$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all\n \n ifdef JSMIN\n-GITWEB_PROGRAMS += gitweb/gitweb.min.js\n-GITWEB_JS = gitweb/gitweb.min.js\n+GITWEB_PROGRAMS += gitweb/static/gitweb.min.js\n+GITWEB_JS = gitweb/static/gitweb.min.js\n else\n-GITWEB_JS = gitweb/gitweb.js\n+GITWEB_JS = gitweb/static/gitweb.js\n endif\n ifdef CSSMIN\n-GITWEB_PROGRAMS += gitweb/gitweb.min.css\n-GITWEB_CSS = gitweb/gitweb.min.css\n+GITWEB_PROGRAMS += gitweb/static/gitweb.min.css\n+GITWEB_CSS = gitweb/static/gitweb.min.css\n else\n-GITWEB_CSS = gitweb/gitweb.css\n+GITWEB_CSS = gitweb/static/gitweb.css\n endif\n OTHER_PROGRAMS +=  gitweb/gitweb.cgi  $(GITWEB_PROGRAMS)\n gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)\n \t$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)\n \n ifdef JSMIN\n-gitweb/gitweb.min.js: gitweb/gitweb.js\n+gitweb/static/gitweb.min.js: gitweb/static/gitweb.js\n \t$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)\n endif # JSMIN\n ifdef CSSMIN\n-gitweb/gitweb.min.css: gitweb/gitweb.css\n+gitweb/static/gitweb.min.css: gitweb/static/gitweb.css\n \t$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)\n endif # CSSMIN\n \n \n-git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js\n+git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\ndiff --git a/gitweb/INSTALL b/gitweb/INSTALL\nindex d484d76..8230531 100644\n--- a/gitweb/INSTALL\n+++ b/gitweb/INSTALL\n@@ -2,9 +2,10 @@ GIT web Interface (gitweb) Installation\n =======================================\n \n First you have to generate gitweb.cgi from gitweb.perl using\n-\"make gitweb\", then copy appropriate files (gitweb.cgi, gitweb.js,\n-gitweb.css, git-logo.png and git-favicon.png) to their destination.\n-For example if git was (or is) installed with /usr prefix, you can do\n+\"make gitweb\", then \"make install-gitweb\" appropriate files\n+(gitweb.cgi, gitweb.js, gitweb.css, git-logo.png and git-favicon.png)\n+to their destination. For example if git was (or is) installed with\n+/usr prefix and gitwebdir is /var/www/cgi-bin, you can do\n \n \t$ make prefix=/usr gitweb                            ;# as yourself\n \t# make gitwebdir=/var/www/cgi-bin install-gitweb     ;# as root\n@@ -81,16 +82,14 @@ Build example\n   minifiers, you can do\n \n \tmake GITWEB_PROJECTROOT=\"/home/local/scm\" \\\n-\t     GITWEB_JS=\"/gitweb/gitweb.js\" \\\n-\t     GITWEB_CSS=\"/gitweb/gitweb.css\" \\\n-\t     GITWEB_LOGO=\"/gitweb/git-logo.png\" \\\n-\t     GITWEB_FAVICON=\"/gitweb/git-favicon.png\" \\\n+\t     GITWEB_JS=\"gitweb/static/gitweb.js\" \\\n+\t     GITWEB_CSS=\"gitweb/static/gitweb.css\" \\\n+\t     GITWEB_LOGO=\"gitweb/static/git-logo.png\" \\\n+\t     GITWEB_FAVICON=\"gitweb/static/git-favicon.png\" \\\n \t     bindir=/usr/local/bin \\\n \t     gitweb\n \n-\tcp -fv gitweb/gitweb.{cgi,js,css} \\\n-\t       gitweb/git-{favicon,logo}.png \\\n-\t     /var/www/cgi-bin/gitweb/\n+\tmake gitwebdir=/var/www/cgi-bin/gitweb install-gitweb\n \n \n Gitweb config file\ndiff --git a/gitweb/Makefile b/gitweb/Makefile\nindex 935d2d2..d2584fe 100644\n--- a/gitweb/Makefile\n+++ b/gitweb/Makefile\n@@ -4,10 +4,10 @@ all::\n # Define V=1 to have a more verbose compile.\n #\n # Define JSMIN to point to JavaScript minifier that functions as\n-# a filter to have gitweb.js minified.\n+# a filter to have static/gitweb.js minified.\n #\n # Define CSSMIN to point to a CSS minifier in order to generate a minified\n-# version of gitweb.css\n+# version of static/gitweb.css\n #\n \n prefix ?= $(HOME)\n@@ -29,10 +29,10 @@ GITWEB_STRICT_EXPORT =\n GITWEB_BASE_URL =\n GITWEB_LIST =\n GITWEB_HOMETEXT = indextext.html\n-GITWEB_CSS = gitweb.css\n-GITWEB_LOGO = git-logo.png\n-GITWEB_FAVICON = git-favicon.png\n-GITWEB_JS = gitweb.js\n+GITWEB_CSS = static/gitweb.css\n+GITWEB_LOGO = static/git-logo.png\n+GITWEB_FAVICON = static/git-favicon.png\n+GITWEB_JS = static/gitweb.js\n GITWEB_SITE_HEADER =\n GITWEB_SITE_FOOTER =\n \n@@ -54,6 +54,7 @@ PERL_PATH  ?= /usr/bin/perl\n # Shell quote;\n bindir_SQ = $(subst ','\\'',$(bindir))#'\n gitwebdir_SQ = $(subst ','\\'',$(gitwebdir))#'\n+gitwebstaticdir_SQ = $(subst ','\\'',$(gitwebdir)/static)#'\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))#'\n PERL_PATH_SQ  = $(subst ','\\'',$(PERL_PATH))#'\n DESTDIR_SQ    = $(subst ','\\'',$(DESTDIR))#'\n@@ -88,26 +89,26 @@ all:: gitweb.cgi\n GITWEB_PROGRAMS = gitweb.cgi\n \n ifdef JSMIN\n-GITWEB_FILES += gitweb.min.js\n-GITWEB_JS = gitweb.min.js\n-all:: gitweb.min.js\n-gitweb.min.js: gitweb.js GITWEB-BUILD-OPTIONS\n+GITWEB_FILES += static/gitweb.min.js\n+GITWEB_JS = static/gitweb.min.js\n+all:: static/gitweb.min.js\n+static/gitweb.min.js: static/gitweb.js GITWEB-BUILD-OPTIONS\n \t$(QUIET_GEN)$(JSMIN) <$< >$@\n else\n-GITWEB_FILES += gitweb.js\n+GITWEB_FILES += static/gitweb.js\n endif\n \n ifdef CSSMIN\n-GITWEB_FILES += gitweb.min.css\n-GITWEB_CSS = gitweb.min.css\n-all:: gitweb.min.css\n-gitweb.min.css: gitweb.css GITWEB-BUILD-OPTIONS\n+GITWEB_FILES += static/gitweb.min.css\n+GITWEB_CSS = static/gitweb.min.css\n+all:: static/gitweb.min.css\n+static/gitweb.min.css: static/gitweb.css GITWEB-BUILD-OPTIONS\n \t$(QUIET_GEN)$(CSSMIN) <$ >$@\n else\n-GITWEB_FILES += gitweb.css\n+GITWEB_FILES += static/gitweb.css\n endif\n \n-GITWEB_FILES += git-logo.png git-favicon.png\n+GITWEB_FILES += static/git-logo.png static/git-favicon.png\n \n GITWEB_REPLACE = \\\n \t-e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \\\n@@ -147,12 +148,13 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS\n install: all\n \t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'\n \t$(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)'\n-\t$(INSTALL) -m 644 $(GITWEB_FILES)    '$(DESTDIR_SQ)$(gitwebdir_SQ)'\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'\n+\t$(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'\n \n ### Cleaning rules\n \n clean:\n-\t$(RM) gitweb.cgi gitweb.min.js gitweb.min.css GITWEB-BUILD-OPTIONS\n+\t$(RM) gitweb.cgi static/gitweb.min.js static/gitweb.min.css GITWEB-BUILD-OPTIONS\n \n .PHONY: all clean install .FORCE-GIT-VERSION-FILE FORCE\n \ndiff --git a/gitweb/README b/gitweb/README\nindex 71742b3..0e19be8 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -80,24 +80,26 @@ You can specify the following configuration variables when building GIT:\n    Points to the location where you put gitweb.css on your web server\n    (or to be more generic, the URI of gitweb stylesheet).  Relative to the\n    base URI of gitweb.  Note that you can setup multiple stylesheets from\n-   the gitweb config file.  [Default: gitweb.css (or gitweb.min.css if the\n-   CSSMIN variable is defined / CSS minifier is used)]\n+   the gitweb config file.  [Default: static/gitweb.css (or\n+   static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier\n+   is used)]\n  * GITWEB_LOGO\n    Points to the location where you put git-logo.png on your web server\n    (or to be more generic URI of logo, 72x27 size, displayed in top right\n    corner of each gitweb page, and used as logo for Atom feed).  Relative\n-   to base URI of gitweb.  [Default: git-logo.png]\n+   to base URI of gitweb.  [Default: static/git-logo.png]\n  * GITWEB_FAVICON\n    Points to the location where you put git-favicon.png on your web server\n    (or to be more generic URI of favicon, assumed to be image/png type;\n    web browsers that support favicons (website icons) may display them\n    in the browser's URL bar and next to site name in bookmarks).  Relative\n-   to base URI of gitweb.  [Default: git-favicon.png]\n+   to base URI of gitweb.  [Default: static/git-favicon.png]\n  * GITWEB_JS\n    Points to the localtion where you put gitweb.js on your web server\n    (or to be more generic URI of JavaScript code used by gitweb).\n-   Relative to base URI of gitweb.  [Default: gitweb.js (or gitweb.min.js\n-   if JSMIN build variable is defined / JavaScript minifier is used)]\n+   Relative to base URI of gitweb.  [Default: static/gitweb.js (or\n+   static/gitweb.min.js if JSMIN build variable is defined / JavaScript\n+   minifier is used)]\n  * GITWEB_CONFIG\n    This Perl file will be loaded using 'do' and can be used to override any\n    of the options above as well as some other options -- see the \"Runtime\ndiff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\nsimilarity index 100%\nrename from gitweb/gitweb.css\nrename to gitweb/static/gitweb.css\ndiff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\nsimilarity index 100%\nrename from gitweb/gitweb.js\nrename to gitweb/static/gitweb.js\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 5a734b1..b70b891 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -19,9 +19,9 @@ our \\$site_name = '[localhost]';\n our \\$site_header = '';\n our \\$site_footer = '';\n our \\$home_text = 'indextext.html';\n-our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css');\n-our \\$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png';\n-our \\$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png';\n+our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/static/gitweb.css');\n+our \\$logo = 'file:///$TEST_DIRECTORY/../gitweb/static/git-logo.png';\n+our \\$favicon = 'file:///$TEST_DIRECTORY/../gitweb/static/git-favicon.png';\n our \\$projects_list = '';\n our \\$export_ok = '';\n our \\$strict_export = '';\n-- \n1.7.1.18.g74211d.dirty\n"},{"id":"142216","messageId":"201005242205.43194.chriscool@tuxfamily.org","threadId":"23891","inReplyTo":"1274714564-7553-1-git-send-email-pavan.sss1991@gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-05-24T20:05:43Z","receivedAt":"2010-05-24T20:05:43Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n> \n>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n>  gitweb/{ => static}/gitweb.css      |    0\n>  gitweb/{ => static}/gitweb.js       |    0\n\nThe patch is supposed to move git-favicon.png and git-logo.png into \ngitweb/static but it doesn't.\n\n>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n> similarity index 100%\n> rename from gitweb/gitweb.css\n> rename to gitweb/static/gitweb.css\n> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n> similarity index 100%\n> rename from gitweb/gitweb.js\n> rename to gitweb/static/gitweb.js\n\nOnly gitweb.css and gitweb.js are moved into gitweb/static and that gives some \nerrors when running make install:\n\ninstall -d -m 755 '/home/christian/share/gitweb'\ninstall -m 755 gitweb.cgi '/home/christian/share/gitweb'\ninstall -d -m 755 '/home/christian/share/gitweb/static'\ninstall -m 644 static/gitweb.js static/gitweb.css static/git-logo.png \nstatic/git-favicon.png '/home/christian/share/gitweb/static'\ninstall: cannot stat `static/git-logo.png': No such file or directory\ninstall: cannot stat `static/git-favicon.png': No such file or directory\nmake[1]: *** [install] Error 1\nmake[1]: Leaving directory `/home/christian/work/git/gitweb'\nmake: *** [install] Error 2\n\nBest regards,\nChristian.\n"},{"id":"142217","messageId":"AANLkTilqa8HAs9jHJQ5KxWic1IYOZxCj10f11KBRMA-b@mail.gmail.com","threadId":"23891","inReplyTo":"201005242205.43194.chriscool@tuxfamily.org","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-05-24T20:28:07Z","receivedAt":"2010-05-24T20:28:07Z","isPatch":false,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"I don't understand why the binary files aren't moving into static/ dir.\nI haven't faced this type of problem before. Give me some time to figure it out.\n\nOn Tue, May 25, 2010 at 1:35 AM, Christian Couder\n<chriscool@tuxfamily.org> wrote:\n> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n>>\n>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n>>  gitweb/{ => static}/gitweb.css      |    0\n>>  gitweb/{ => static}/gitweb.js       |    0\n>\n> The patch is supposed to move git-favicon.png and git-logo.png into\n> gitweb/static but it doesn't.\n>\n>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n>> similarity index 100%\n>> rename from gitweb/gitweb.css\n>> rename to gitweb/static/gitweb.css\n>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n>> similarity index 100%\n>> rename from gitweb/gitweb.js\n>> rename to gitweb/static/gitweb.js\n>\n> Only gitweb.css and gitweb.js are moved into gitweb/static and that gives some\n> errors when running make install:\n>\n> install -d -m 755 '/home/christian/share/gitweb'\n> install -m 755 gitweb.cgi '/home/christian/share/gitweb'\n> install -d -m 755 '/home/christian/share/gitweb/static'\n> install -m 644 static/gitweb.js static/gitweb.css static/git-logo.png\n> static/git-favicon.png '/home/christian/share/gitweb/static'\n> install: cannot stat `static/git-logo.png': No such file or directory\n> install: cannot stat `static/git-favicon.png': No such file or directory\n> make[1]: *** [install] Error 1\n> make[1]: Leaving directory `/home/christian/work/git/gitweb'\n> make: *** [install] Error 2\n>\n> Best regards,\n> Christian.\n>\n"},{"id":"142225","messageId":"201005250237.53529.jnareb@gmail.com","threadId":"23891","inReplyTo":"AANLkTilqa8HAs9jHJQ5KxWic1IYOZxCj10f11KBRMA-b@mail.gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-25T00:37:50Z","receivedAt":"2010-05-25T00:37:50Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n> On Tue, May 25, 2010 at 1:35 AM, Christian Couder <chriscool@tuxfamily.org> wrote:\n>> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n>>>\n>>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n>>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n>>>  gitweb/{ => static}/gitweb.css      |    0\n>>>  gitweb/{ => static}/gitweb.js       |    0\n>>\n>> The patch is supposed to move git-favicon.png and git-logo.png into\n>> gitweb/static but it doesn't.\n>>\n>>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n>>> similarity index 100%\n>>> rename from gitweb/gitweb.css\n>>> rename to gitweb/static/gitweb.css\n>>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n>>> similarity index 100%\n>>> rename from gitweb/gitweb.js\n>>> rename to gitweb/static/gitweb.js\n>>\n>> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n>\n> I don't understand why the binary files aren't moving into static/ dir.\n> I haven't faced this type of problem before. Give me some time to figure it out.\n\nYou have found a bug in git.  When you do a pure rename of a binary\nfile, it doesn't show as a pure rename patch:\n\n  $ git init\n  $ echo foo > foo\n  $ echo -e \"bar\\0\" > bar\n  $ git add .\n  $ git commit -m 'Initial commit'\n  [master (root-commit) 4bd35b8] Initial commit\n   2 files changed, 1 insertions(+), 0 deletions(-)\n   create mode 100644 bar\n   create mode 100644 foo\n  $ mkdir sub\n  $ git mv bar foo sub/\n  $ git commit -m 'Moved to sub/'\n  [master 00356a5] Moved to sub/\n   2 files changed, 0 insertions(+), 0 deletions(-)\n   rename bar => sub/bar (100%)\n   rename foo => sub/foo (100%)\n  $ git show -C -C --raw --binary --stat\n  commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n  Author: Jakub Narebski <jnareb@gmail.com>\n  Date:   Tue May 25 02:23:26 2010 +0200\n  \n      Moved to sub/\n  ---\n  :100644 100644 080090e... 080090e... R100       bar     sub/bar\n  :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n  \n   bar => sub/bar |  Bin 5 -> 5 bytes\n   foo => sub/foo |    0\n   2 files changed, 0 insertions(+), 0 deletions(-)\n  \n  diff --git a/foo b/sub/foo\n  similarity index 100%\n  rename from foo\n  rename to sub/foo\n\nAs you can see there is not\n\n  diff --git a/bar b/sub/bar\n  similarity index 100%\n  rename from bar\n  rename to sub/bar\n\nand that adding '--binary' option doesn't help\n-- \nJakub Narebski\nPoland\n"},{"id":"142229","messageId":"201005250514.39980.chriscool@tuxfamily.org","threadId":"23891","inReplyTo":"201005250237.53529.jnareb@gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-05-25T03:14:39Z","receivedAt":"2010-05-25T03:14:39Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tuesday 25 May 2010 02:37:50 Jakub Narebski wrote:\n> On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n> > On Tue, May 25, 2010 at 1:35 AM, Christian Couder \n<chriscool@tuxfamily.org> wrote:\n> >> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n> >>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n> >>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n> >>>  gitweb/{ => static}/gitweb.css      |    0\n> >>>  gitweb/{ => static}/gitweb.js       |    0\n> >>\n> >> The patch is supposed to move git-favicon.png and git-logo.png into\n> >> gitweb/static but it doesn't.\n> >>\n> >>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n> >>> similarity index 100%\n> >>> rename from gitweb/gitweb.css\n> >>> rename to gitweb/static/gitweb.css\n> >>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n> >>> similarity index 100%\n> >>> rename from gitweb/gitweb.js\n> >>> rename to gitweb/static/gitweb.js\n> >>\n> >> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n> >\n> > I don't understand why the binary files aren't moving into static/ dir.\n> > I haven't faced this type of problem before. Give me some time to figure\n> > it out.\n> \n> You have found a bug in git.  When you do a pure rename of a binary\n> file, it doesn't show as a pure rename patch:\n> \n>   $ git init\n>   $ echo foo > foo\n>   $ echo -e \"bar\\0\" > bar\n>   $ git add .\n>   $ git commit -m 'Initial commit'\n>   [master (root-commit) 4bd35b8] Initial commit\n>    2 files changed, 1 insertions(+), 0 deletions(-)\n>    create mode 100644 bar\n>    create mode 100644 foo\n>   $ mkdir sub\n>   $ git mv bar foo sub/\n>   $ git commit -m 'Moved to sub/'\n>   [master 00356a5] Moved to sub/\n>    2 files changed, 0 insertions(+), 0 deletions(-)\n>    rename bar => sub/bar (100%)\n>    rename foo => sub/foo (100%)\n>   $ git show -C -C --raw --binary --stat\n>   commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n>   Author: Jakub Narebski <jnareb@gmail.com>\n>   Date:   Tue May 25 02:23:26 2010 +0200\n> \n>       Moved to sub/\n>   ---\n> \n>   :100644 100644 080090e... 080090e... R100       bar     sub/bar\n>   :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n> \n>    bar => sub/bar |  Bin 5 -> 5 bytes\n>    foo => sub/foo |    0\n>    2 files changed, 0 insertions(+), 0 deletions(-)\n> \n>   diff --git a/foo b/sub/foo\n>   similarity index 100%\n>   rename from foo\n>   rename to sub/foo\n> \n> As you can see there is not\n> \n>   diff --git a/bar b/sub/bar\n>   similarity index 100%\n>   rename from bar\n>   rename to sub/bar\n> \n> and that adding '--binary' option doesn't help\n\nI tested current master, next and pu with this script:\n\n$ cat test_move_binary.sh\n#!/bin/sh\n\nrm -rf test_binary_dir\nmkdir test_binary_dir\ncd test_binary_dir\n\ngit init\necho foo > foo\necho -e \"bar\\0\" > bar\ngit add .\ngit commit -m \"Initial commit\"\nmkdir sub\ngit mv bar foo sub/\ngit commit -m 'Moved to sub/'\ngit show -C -C --raw --binary --stat\n\nAnd I get:\n\n$ ./test_move_binary.sh\nInitialized empty Git repository in \n/home/christian/work/git/test_binary_dir/.git/\n[master (root-commit) e4c2beb] Initial commit\n 2 files changed, 2 insertions(+), 0 deletions(-)\n create mode 100644 bar\n create mode 100644 foo\n[master 4fd23ac] Moved to sub/\n 2 files changed, 0 insertions(+), 0 deletions(-)\n rename bar => sub/bar (100%)\n rename foo => sub/foo (100%)\ncommit 4fd23ac43186d31879d7e9dc98b74ce9a7382558\nAuthor: Christian Couder <chriscool@tuxfamily.org>\nDate:   Tue May 25 05:10:00 2010 +0200\n\n    Moved to sub/\n---\n:100644 100644 aae0a5b... aae0a5b... R100       bar     sub/bar\n:100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n bar => sub/bar |    0\n foo => sub/foo |    0\n 2 files changed, 0 insertions(+), 0 deletions(-)\n\ndiff --git a/bar b/sub/bar\nsimilarity index 100%\nrename from bar\nrename to sub/bar\ndiff --git a/foo b/sub/foo\nsimilarity index 100%\nrename from foo\nrename to sub/foo\n\nso it works fine for me. Which version are you using?\n\nThanks,\nChristian.\n"},{"id":"142231","messageId":"201005250624.31097.chriscool@tuxfamily.org","threadId":"23891","inReplyTo":"AANLkTikaS0m8VJ6hpSA2-pefN1w8Y5J64rr6xNMj1B3q@mail.gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-05-25T04:24:31Z","receivedAt":"2010-05-25T04:24:31Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tuesday 25 May 2010 06:30:49 Pavan Kumar Sunkara wrote:\n> 2010/5/25 Christian Couder <chriscool@tuxfamily.org>:\n> > On Tuesday 25 May 2010 02:37:50 Jakub Narebski wrote:\n> >> On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n> >> > On Tue, May 25, 2010 at 1:35 AM, Christian Couder\n> >\n> > <chriscool@tuxfamily.org> wrote:\n> >> >> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n> >> >>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n> >> >>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n> >> >>>  gitweb/{ => static}/gitweb.css      |    0\n> >> >>>  gitweb/{ => static}/gitweb.js       |    0\n> >> >>\n> >> >> The patch is supposed to move git-favicon.png and git-logo.png into\n> >> >> gitweb/static but it doesn't.\n> >> >>\n> >> >>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n> >> >>> similarity index 100%\n> >> >>> rename from gitweb/gitweb.css\n> >> >>> rename to gitweb/static/gitweb.css\n> >> >>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n> >> >>> similarity index 100%\n> >> >>> rename from gitweb/gitweb.js\n> >> >>> rename to gitweb/static/gitweb.js\n> >> >>\n> >> >> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n> >> >\n> >> > I don't understand why the binary files aren't moving into static/\n> >> > dir. I haven't faced this type of problem before. Give me some time to\n> >> > figure it out.\n> >>\n> >> You have found a bug in git.  When you do a pure rename of a binary\n> >> file, it doesn't show as a pure rename patch:\n> >>\n> >>   $ git init\n> >>   $ echo foo > foo\n> >>   $ echo -e \"bar\\0\" > bar\n> >>   $ git add .\n> >>   $ git commit -m 'Initial commit'\n> >>   [master (root-commit) 4bd35b8] Initial commit\n> >>    2 files changed, 1 insertions(+), 0 deletions(-)\n> >>    create mode 100644 bar\n> >>    create mode 100644 foo\n> >>   $ mkdir sub\n> >>   $ git mv bar foo sub/\n> >>   $ git commit -m 'Moved to sub/'\n> >>   [master 00356a5] Moved to sub/\n> >>    2 files changed, 0 insertions(+), 0 deletions(-)\n> >>    rename bar => sub/bar (100%)\n> >>    rename foo => sub/foo (100%)\n> >>   $ git show -C -C --raw --binary --stat\n> >>   commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n> >>   Author: Jakub Narebski <jnareb@gmail.com>\n> >>   Date:   Tue May 25 02:23:26 2010 +0200\n> >>\n> >>       Moved to sub/\n> >>   ---\n> >>\n> >>   :100644 100644 080090e... 080090e... R100       bar     sub/bar\n> >>   :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n> >>\n> >>    bar => sub/bar |  Bin 5 -> 5 bytes\n> >>    foo => sub/foo |    0\n> >>    2 files changed, 0 insertions(+), 0 deletions(-)\n> >>\n> >>   diff --git a/foo b/sub/foo\n> >>   similarity index 100%\n> >>   rename from foo\n> >>   rename to sub/foo\n> >>\n> >> As you can see there is not\n> >>\n> >>   diff --git a/bar b/sub/bar\n> >>   similarity index 100%\n> >>   rename from bar\n> >>   rename to sub/bar\n> >>\n> >> and that adding '--binary' option doesn't help\n> \n> Jakub is right. It isn't working for me too.\n> \n> > I tested current master, next and pu with this script:\n> >\n> > $ cat test_move_binary.sh\n> > #!/bin/sh\n> >\n> > rm -rf test_binary_dir\n> > mkdir test_binary_dir\n> > cd test_binary_dir\n> >\n> > git init\n> > echo foo > foo\n> > echo -e \"bar\\0\" > bar\n> > git add .\n> > git commit -m \"Initial commit\"\n> > mkdir sub\n> > git mv bar foo sub/\n> > git commit -m 'Moved to sub/'\n> > git show -C -C --raw --binary --stat\n> >\n> > And I get:\n> >\n> > $ ./test_move_binary.sh\n> > Initialized empty Git repository in\n> > /home/christian/work/git/test_binary_dir/.git/\n> > [master (root-commit) e4c2beb] Initial commit\n> >  2 files changed, 2 insertions(+), 0 deletions(-)\n> >  create mode 100644 bar\n> >  create mode 100644 foo\n> > [master 4fd23ac] Moved to sub/\n> >  2 files changed, 0 insertions(+), 0 deletions(-)\n> >  rename bar => sub/bar (100%)\n> >  rename foo => sub/foo (100%)\n> > commit 4fd23ac43186d31879d7e9dc98b74ce9a7382558\n> > Author: Christian Couder <chriscool@tuxfamily.org>\n> > Date:   Tue May 25 05:10:00 2010 +0200\n> >\n> >    Moved to sub/\n> > ---\n> >\n> > :100644 100644 aae0a5b... aae0a5b... R100       bar     sub/bar\n> > :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n> >\n> >  bar => sub/bar |    0\n> >  foo => sub/foo |    0\n> >  2 files changed, 0 insertions(+), 0 deletions(-)\n> >\n> > diff --git a/bar b/sub/bar\n> > similarity index 100%\n> > rename from bar\n> > rename to sub/bar\n> > diff --git a/foo b/sub/foo\n> > similarity index 100%\n> > rename from foo\n> > rename to sub/foo\n> >\n> > so it works fine for me. Which version are you using?\n> \n> It's not a problem with the version, it's a problem with your system.\n> echo -e didn't create a binary as expected. You can tell it by seeing\n> this line:\n> \n> bar => sub/bar | 0\n> \n> rather than this\n> \n> bar => sub/bar | Bin 5 -> 5 Bytes\n> \n> Change your script to copy a binary file into bar instead of using\n> 'echo -e 'bar\\()' and you will see the difference.\n\nYeah I changed \"#!/bin/sh\" to \"#!/bin/bash\" and it does not work now.\nIt's a problem because /bin/sh is dash on kubuntu.\n \nThanks,\nChristian.\n"},{"id":"142230","messageId":"AANLkTikaS0m8VJ6hpSA2-pefN1w8Y5J64rr6xNMj1B3q@mail.gmail.com","threadId":"23891","inReplyTo":"201005250514.39980.chriscool@tuxfamily.org","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-05-25T04:30:49Z","receivedAt":"2010-05-25T04:30:49Z","isPatch":false,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"2010/5/25 Christian Couder <chriscool@tuxfamily.org>:\n> On Tuesday 25 May 2010 02:37:50 Jakub Narebski wrote:\n>> On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n>> > On Tue, May 25, 2010 at 1:35 AM, Christian Couder\n> <chriscool@tuxfamily.org> wrote:\n>> >> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n>> >>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n>> >>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n>> >>>  gitweb/{ => static}/gitweb.css      |    0\n>> >>>  gitweb/{ => static}/gitweb.js       |    0\n>> >>\n>> >> The patch is supposed to move git-favicon.png and git-logo.png into\n>> >> gitweb/static but it doesn't.\n>> >>\n>> >>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n>> >>> similarity index 100%\n>> >>> rename from gitweb/gitweb.css\n>> >>> rename to gitweb/static/gitweb.css\n>> >>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n>> >>> similarity index 100%\n>> >>> rename from gitweb/gitweb.js\n>> >>> rename to gitweb/static/gitweb.js\n>> >>\n>> >> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n>> >\n>> > I don't understand why the binary files aren't moving into static/ dir.\n>> > I haven't faced this type of problem before. Give me some time to figure\n>> > it out.\n>>\n>> You have found a bug in git.  When you do a pure rename of a binary\n>> file, it doesn't show as a pure rename patch:\n>>\n>>   $ git init\n>>   $ echo foo > foo\n>>   $ echo -e \"bar\\0\" > bar\n>>   $ git add .\n>>   $ git commit -m 'Initial commit'\n>>   [master (root-commit) 4bd35b8] Initial commit\n>>    2 files changed, 1 insertions(+), 0 deletions(-)\n>>    create mode 100644 bar\n>>    create mode 100644 foo\n>>   $ mkdir sub\n>>   $ git mv bar foo sub/\n>>   $ git commit -m 'Moved to sub/'\n>>   [master 00356a5] Moved to sub/\n>>    2 files changed, 0 insertions(+), 0 deletions(-)\n>>    rename bar => sub/bar (100%)\n>>    rename foo => sub/foo (100%)\n>>   $ git show -C -C --raw --binary --stat\n>>   commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n>>   Author: Jakub Narebski <jnareb@gmail.com>\n>>   Date:   Tue May 25 02:23:26 2010 +0200\n>>\n>>       Moved to sub/\n>>   ---\n>>\n>>   :100644 100644 080090e... 080090e... R100       bar     sub/bar\n>>   :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n>>\n>>    bar => sub/bar |  Bin 5 -> 5 bytes\n>>    foo => sub/foo |    0\n>>    2 files changed, 0 insertions(+), 0 deletions(-)\n>>\n>>   diff --git a/foo b/sub/foo\n>>   similarity index 100%\n>>   rename from foo\n>>   rename to sub/foo\n>>\n>> As you can see there is not\n>>\n>>   diff --git a/bar b/sub/bar\n>>   similarity index 100%\n>>   rename from bar\n>>   rename to sub/bar\n>>\n>> and that adding '--binary' option doesn't help\n\nJakub is right. It isn't working for me too.\n\n> I tested current master, next and pu with this script:\n>\n> $ cat test_move_binary.sh\n> #!/bin/sh\n>\n> rm -rf test_binary_dir\n> mkdir test_binary_dir\n> cd test_binary_dir\n>\n> git init\n> echo foo > foo\n> echo -e \"bar\\0\" > bar\n> git add .\n> git commit -m \"Initial commit\"\n> mkdir sub\n> git mv bar foo sub/\n> git commit -m 'Moved to sub/'\n> git show -C -C --raw --binary --stat\n>\n> And I get:\n>\n> $ ./test_move_binary.sh\n> Initialized empty Git repository in\n> /home/christian/work/git/test_binary_dir/.git/\n> [master (root-commit) e4c2beb] Initial commit\n>  2 files changed, 2 insertions(+), 0 deletions(-)\n>  create mode 100644 bar\n>  create mode 100644 foo\n> [master 4fd23ac] Moved to sub/\n>  2 files changed, 0 insertions(+), 0 deletions(-)\n>  rename bar => sub/bar (100%)\n>  rename foo => sub/foo (100%)\n> commit 4fd23ac43186d31879d7e9dc98b74ce9a7382558\n> Author: Christian Couder <chriscool@tuxfamily.org>\n> Date:   Tue May 25 05:10:00 2010 +0200\n>\n>    Moved to sub/\n> ---\n> :100644 100644 aae0a5b... aae0a5b... R100       bar     sub/bar\n> :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n>  bar => sub/bar |    0\n>  foo => sub/foo |    0\n>  2 files changed, 0 insertions(+), 0 deletions(-)\n>\n> diff --git a/bar b/sub/bar\n> similarity index 100%\n> rename from bar\n> rename to sub/bar\n> diff --git a/foo b/sub/foo\n> similarity index 100%\n> rename from foo\n> rename to sub/foo\n>\n> so it works fine for me. Which version are you using?\n\nIt's not a problem with the version, it's a problem with your system.\necho -e didn't create a binary as expected. You can tell it by seeing\nthis line:\n\nbar => sub/bar | 0\n\nrather than this\n\nbar => sub/bar | Bin 5 -> 5 Bytes\n\nChange your script to copy a binary file into bar instead of using\n'echo -e 'bar\\()' and you will see the difference.\n\nSo, Jakub what should I do ?\nShould I manually add the diff lines for png files ?\n\nThanks\n- Pavan\n"},{"id":"142232","messageId":"AANLkTikOMuugbWqnbkUYwPsxq6z9Eo3E3MrX1jIE5juS@mail.gmail.com","threadId":"23891","inReplyTo":"201005250624.31097.chriscool@tuxfamily.org","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-05-25T04:51:18Z","receivedAt":"2010-05-25T04:51:18Z","isPatch":false,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"On Tue, May 25, 2010 at 9:54 AM, Christian Couder\n<chriscool@tuxfamily.org> wrote:\n> On Tuesday 25 May 2010 06:30:49 Pavan Kumar Sunkara wrote:\n>> 2010/5/25 Christian Couder <chriscool@tuxfamily.org>:\n>> > On Tuesday 25 May 2010 02:37:50 Jakub Narebski wrote:\n>> >> On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n>> >> > On Tue, May 25, 2010 at 1:35 AM, Christian Couder\n>> >\n>> > <chriscool@tuxfamily.org> wrote:\n>> >> >> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n>> >> >>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n>> >> >>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n>> >> >>>  gitweb/{ => static}/gitweb.css      |    0\n>> >> >>>  gitweb/{ => static}/gitweb.js       |    0\n>> >> >>\n>> >> >> The patch is supposed to move git-favicon.png and git-logo.png into\n>> >> >> gitweb/static but it doesn't.\n>> >> >>\n>> >> >>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n>> >> >>> similarity index 100%\n>> >> >>> rename from gitweb/gitweb.css\n>> >> >>> rename to gitweb/static/gitweb.css\n>> >> >>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n>> >> >>> similarity index 100%\n>> >> >>> rename from gitweb/gitweb.js\n>> >> >>> rename to gitweb/static/gitweb.js\n>> >> >>\n>> >> >> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n>> >> >\n>> >> > I don't understand why the binary files aren't moving into static/\n>> >> > dir. I haven't faced this type of problem before. Give me some time to\n>> >> > figure it out.\n>> >>\n>> >> You have found a bug in git.  When you do a pure rename of a binary\n>> >> file, it doesn't show as a pure rename patch:\n>> >>\n>> >>   $ git init\n>> >>   $ echo foo > foo\n>> >>   $ echo -e \"bar\\0\" > bar\n>> >>   $ git add .\n>> >>   $ git commit -m 'Initial commit'\n>> >>   [master (root-commit) 4bd35b8] Initial commit\n>> >>    2 files changed, 1 insertions(+), 0 deletions(-)\n>> >>    create mode 100644 bar\n>> >>    create mode 100644 foo\n>> >>   $ mkdir sub\n>> >>   $ git mv bar foo sub/\n>> >>   $ git commit -m 'Moved to sub/'\n>> >>   [master 00356a5] Moved to sub/\n>> >>    2 files changed, 0 insertions(+), 0 deletions(-)\n>> >>    rename bar => sub/bar (100%)\n>> >>    rename foo => sub/foo (100%)\n>> >>   $ git show -C -C --raw --binary --stat\n>> >>   commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n>> >>   Author: Jakub Narebski <jnareb@gmail.com>\n>> >>   Date:   Tue May 25 02:23:26 2010 +0200\n>> >>\n>> >>       Moved to sub/\n>> >>   ---\n>> >>\n>> >>   :100644 100644 080090e... 080090e... R100       bar     sub/bar\n>> >>   :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n>> >>\n>> >>    bar => sub/bar |  Bin 5 -> 5 bytes\n>> >>    foo => sub/foo |    0\n>> >>    2 files changed, 0 insertions(+), 0 deletions(-)\n>> >>\n>> >>   diff --git a/foo b/sub/foo\n>> >>   similarity index 100%\n>> >>   rename from foo\n>> >>   rename to sub/foo\n>> >>\n>> >> As you can see there is not\n>> >>\n>> >>   diff --git a/bar b/sub/bar\n>> >>   similarity index 100%\n>> >>   rename from bar\n>> >>   rename to sub/bar\n>> >>\n>> >> and that adding '--binary' option doesn't help\n>>\n>> Jakub is right. It isn't working for me too.\n>>\n>> > I tested current master, next and pu with this script:\n>> >\n>> > $ cat test_move_binary.sh\n>> > #!/bin/sh\n>> >\n>> > rm -rf test_binary_dir\n>> > mkdir test_binary_dir\n>> > cd test_binary_dir\n>> >\n>> > git init\n>> > echo foo > foo\n>> > echo -e \"bar\\0\" > bar\n>> > git add .\n>> > git commit -m \"Initial commit\"\n>> > mkdir sub\n>> > git mv bar foo sub/\n>> > git commit -m 'Moved to sub/'\n>> > git show -C -C --raw --binary --stat\n>> >\n>> > And I get:\n>> >\n>> > $ ./test_move_binary.sh\n>> > Initialized empty Git repository in\n>> > /home/christian/work/git/test_binary_dir/.git/\n>> > [master (root-commit) e4c2beb] Initial commit\n>> >  2 files changed, 2 insertions(+), 0 deletions(-)\n>> >  create mode 100644 bar\n>> >  create mode 100644 foo\n>> > [master 4fd23ac] Moved to sub/\n>> >  2 files changed, 0 insertions(+), 0 deletions(-)\n>> >  rename bar => sub/bar (100%)\n>> >  rename foo => sub/foo (100%)\n>> > commit 4fd23ac43186d31879d7e9dc98b74ce9a7382558\n>> > Author: Christian Couder <chriscool@tuxfamily.org>\n>> > Date:   Tue May 25 05:10:00 2010 +0200\n>> >\n>> >    Moved to sub/\n>> > ---\n>> >\n>> > :100644 100644 aae0a5b... aae0a5b... R100       bar     sub/bar\n>> > :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n>> >\n>> >  bar => sub/bar |    0\n>> >  foo => sub/foo |    0\n>> >  2 files changed, 0 insertions(+), 0 deletions(-)\n>> >\n>> > diff --git a/bar b/sub/bar\n>> > similarity index 100%\n>> > rename from bar\n>> > rename to sub/bar\n>> > diff --git a/foo b/sub/foo\n>> > similarity index 100%\n>> > rename from foo\n>> > rename to sub/foo\n>> >\n>> > so it works fine for me. Which version are you using?\n>>\n>> It's not a problem with the version, it's a problem with your system.\n>> echo -e didn't create a binary as expected. You can tell it by seeing\n>> this line:\n>>\n>> bar => sub/bar | 0\n>>\n>> rather than this\n>>\n>> bar => sub/bar | Bin 5 -> 5 Bytes\n>>\n>> Change your script to copy a binary file into bar instead of using\n>> 'echo -e 'bar\\()' and you will see the difference.\n>\n> Yeah I changed \"#!/bin/sh\" to \"#!/bin/bash\" and it does not work now.\n> It's a problem because /bin/sh is dash on kubuntu.\n>\n> Thanks,\n> Christian.\n>\n\nManually adding the diff lines for both the binary files and applying\nthat patch worked for me.\n So, shall I send it to git list for now ?\n\nThanks,\nPavan.\n"},{"id":"142241","messageId":"201005250832.58350.chriscool@tuxfamily.org","threadId":"23891","inReplyTo":"AANLkTikOMuugbWqnbkUYwPsxq6z9Eo3E3MrX1jIE5juS@mail.gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-05-25T06:32:58Z","receivedAt":"2010-05-25T06:32:58Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tuesday 25 May 2010 06:51:18 Pavan Kumar Sunkara wrote:\n> On Tue, May 25, 2010 at 9:54 AM, Christian Couder\n> \n> <chriscool@tuxfamily.org> wrote:\n> > On Tuesday 25 May 2010 06:30:49 Pavan Kumar Sunkara wrote:\n\n> >> It's not a problem with the version, it's a problem with your system.\n> >> echo -e didn't create a binary as expected. You can tell it by seeing\n> >> this line:\n> >>\n> >> bar => sub/bar | 0\n> >>\n> >> rather than this\n> >>\n> >> bar => sub/bar | Bin 5 -> 5 Bytes\n> >>\n> >> Change your script to copy a binary file into bar instead of using\n> >> 'echo -e 'bar\\()' and you will see the difference.\n> >\n> > Yeah I changed \"#!/bin/sh\" to \"#!/bin/bash\" and it does not work now.\n> > It's a problem because /bin/sh is dash on kubuntu.\n> >\n> > Thanks,\n> > Christian.\n> \n> Manually adding the diff lines for both the binary files and applying\n> that patch worked for me.\n>  So, shall I send it to git list for now ?\n\nYes please!\n\nThanks,\nChristian.\n"},{"id":"142297","messageId":"201005252322.27443.chriscool@tuxfamily.org","threadId":"23891","inReplyTo":"201005250237.53529.jnareb@gmail.com","subject":"Re: [PATCHv5 GSoC] gitweb: Move static files into seperate subdirectory","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-05-25T21:22:27Z","receivedAt":"2010-05-25T21:22:27Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tuesday 25 May 2010 02:37:50 Jakub Narebski wrote:\n> On Mon, 24 May 2010, Pavan Kumar Sunkara wrote:\n> > On Tue, May 25, 2010 at 1:35 AM, Christian Couder \n<chriscool@tuxfamily.org> wrote:\n> >> On Monday 24 May 2010 17:22:44 Pavan Kumar Sunkara wrote:\n> >>>  gitweb/{ => static}/git-favicon.png |  Bin 115 -> 115 bytes\n> >>>  gitweb/{ => static}/git-logo.png    |  Bin 207 -> 207 bytes\n> >>>  gitweb/{ => static}/gitweb.css      |    0\n> >>>  gitweb/{ => static}/gitweb.js       |    0\n> >>\n> >> The patch is supposed to move git-favicon.png and git-logo.png into\n> >> gitweb/static but it doesn't.\n> >>\n> >>>  diff --git a/gitweb/gitweb.css b/gitweb/static/gitweb.css\n> >>> similarity index 100%\n> >>> rename from gitweb/gitweb.css\n> >>> rename to gitweb/static/gitweb.css\n> >>> diff --git a/gitweb/gitweb.js b/gitweb/static/gitweb.js\n> >>> similarity index 100%\n> >>> rename from gitweb/gitweb.js\n> >>> rename to gitweb/static/gitweb.js\n> >>\n> >> Only gitweb.css and gitweb.js are moved into gitweb/static [...]\n> >\n> > I don't understand why the binary files aren't moving into static/ dir.\n> > I haven't faced this type of problem before. Give me some time to figure\n> > it out.\n> \n> You have found a bug in git.  When you do a pure rename of a binary\n> file, it doesn't show as a pure rename patch:\n> \n>   $ git init\n>   $ echo foo > foo\n>   $ echo -e \"bar\\0\" > bar\n>   $ git add .\n>   $ git commit -m 'Initial commit'\n>   [master (root-commit) 4bd35b8] Initial commit\n>    2 files changed, 1 insertions(+), 0 deletions(-)\n>    create mode 100644 bar\n>    create mode 100644 foo\n>   $ mkdir sub\n>   $ git mv bar foo sub/\n>   $ git commit -m 'Moved to sub/'\n>   [master 00356a5] Moved to sub/\n>    2 files changed, 0 insertions(+), 0 deletions(-)\n>    rename bar => sub/bar (100%)\n>    rename foo => sub/foo (100%)\n>   $ git show -C -C --raw --binary --stat\n>   commit 00356a5ec458fa64ab3eca2c23ebc53e9f2d54ba\n>   Author: Jakub Narebski <jnareb@gmail.com>\n>   Date:   Tue May 25 02:23:26 2010 +0200\n> \n>       Moved to sub/\n>   ---\n> \n>   :100644 100644 080090e... 080090e... R100       bar     sub/bar\n>   :100644 100644 257cc56... 257cc56... R100       foo     sub/foo\n> \n>    bar => sub/bar |  Bin 5 -> 5 bytes\n>    foo => sub/foo |    0\n>    2 files changed, 0 insertions(+), 0 deletions(-)\n> \n>   diff --git a/foo b/sub/foo\n>   similarity index 100%\n>   rename from foo\n>   rename to sub/foo\n> \n> As you can see there is not\n> \n>   diff --git a/bar b/sub/bar\n>   similarity index 100%\n>   rename from bar\n>   rename to sub/bar\n> \n> and that adding '--binary' option doesn't help\n\nI bisected this bug to the following commit:\n\ncommit 3e97c7c6af2901cec63bf35fcd43ae3472e24af8\nAuthor: Greg Bacon <gbacon@dbresearch.net>\nDate:   Thu Nov 19 15:12:24 2009 -0600\n\n    No diff -b/-w output for all-whitespace changes\n\n    Change git-diff's whitespace-ignoring modes to generate\n    output only if a non-empty patch results, which git-apply\n    rejects.\n\n    Update the tests to look for the new behavior.\n\n    Signed-off-by: Greg Bacon <gbacon@dbresearch.net>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nThe following RFC patch seems to fix it. I will resend it perhaps with an added \ntest case if no one complains.\n\n----- >8 -----\n\nFrom: Christian Couder <chriscool@tuxfamily.org>\nDate: Tue, 25 May 2010 23:12:00 +0200\nSubject: [PATCH] diff: fix \"git show -C -C\" output when renaming a binary file\n\nA bug was introduced in 3e97c7c6af2901cec63bf35fcd43ae3472e24af8\n(No diff -b/-w output for all-whitespace changes, Nov 19 2009)\nthat made the lines:\n\ndiff --git a/bar b/sub/bar\nsimilarity index 100%\nrename from bar\nrename to sub/bar\n\ndisappear from \"git show -C -C\" output when file bar is a binary\nfile.\n---\n diff.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 494f560..0b00271 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1737,6 +1737,10 @@ static void builtin_diff(const char *name_a,\n                                                textconv_one, textconv_two, \no);\n                        o->found_changes = 1;\n                        goto free_ab_and_return;\n+               } else if (diff_filespec_is_binary(one) &&\n+                          diff_filespec_is_binary(two)) {\n+                       fprintf(o->file, \"%s\", header.buf);\n+                       strbuf_reset(&header);\n                }\n        }\n\n--\n1.7.1.226.g770c5.dirty\n"}]}