threads / discuss / 27512

weird rename

Subject: weird rename

## tl;dr

3 messages between May 31, 2011 and May 31, 2011.

replies: 2people: 2as markdown or json

Fabian Zeindl· May 31, 2011, 19:12 UTC · lore
Hi,
 i use a GUI for git and discovered that it showed me a rename in a commit where i actually replaced a file.
So i looked at the commit via git show, and found the following:
Binary files /dev/null and b/lib/swt-3.7M7-win32.jar differ
diff --git a/lib/swt-3.7M7-win64.jar b/lib/swt-3.7M7-win64.jar

Where is the /dev/null coming from?

Regards
Fabian Zeindl
Reece Dunn· May 31, 2011, 19:18 UTC · re: Fabian Zeindl · lore

Re: weird rename

On 31 May 2011 20:12, Fabian Zeindl <fabian.zeindl@gmail.com> wrote:
Show 9 quoted lines
> Hi,
>
>  i use a GUI for git and discovered that it showed me a rename in a commit where i actually replaced a file.
> So i looked at the commit via git show, and found the following:
>
> Binary files /dev/null and b/lib/swt-3.7M7-win32.jar differ
> diff --git a/lib/swt-3.7M7-win64.jar b/lib/swt-3.7M7-win64.jar
>
> Where is the /dev/null coming from?

/dev/null is used to indicate "does not exist" -- it is a file device on Unix boxes that emits null characters or consumes output sending it to oblivion :)!

Comparing /dev/null with A -- A is a new (added) file.
Comparing A with /dev/null -- A is deleted.
HTH,
- Reece
Fabian Zeindl· May 31, 2011, 19:19 UTC · re: Reece Dunn · lore

Re: weird rename

On May 31, 2011, at 9:18 PM, Reece Dunn wrote:
> /dev/null is used to indicate "does not exist" 
yeah i know that :)
> Comparing /dev/null with A -- A is a new (added) file.
> Comparing A with /dev/null -- A is deleted.

ok, i deleted a similar sounding file (3.7M3 instead of 3.7M7), i just wonder why git got that as a rename. or the GUI (GitX) at least.

fabian

← back to recent threads